Prevented a memory leak that in most cases was closed by a race condition

This commit is contained in:
Thomas Schmitt 2013-11-16 17:05:40 +00:00
parent 889d1e4f70
commit 412e5e04b9
2 changed files with 3 additions and 1 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2013.11.15.102314"
#define Cdrskin_timestamP "2013.11.16.170431"

View File

@ -20,6 +20,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "libdax_msgs.h"
extern struct libdax_msgs *libdax_messenger;
@ -93,6 +94,7 @@ int burn_write_opts_clone(struct burn_write_opts *from,
return -1;
}
memcpy(*to, from, sizeof(struct burn_write_opts));
(*to)->refcount= 1;
return 1;
}