Hopefully fixed memory problem which causes sigabrt on free
This commit is contained in:
parent
59ba152e36
commit
e282d5f686
@ -30,7 +30,7 @@ int libdax_audioxtr_new(struct libdax_audioxtr **xtr, char *path, int flag)
|
|||||||
int ret;
|
int ret;
|
||||||
struct libdax_audioxtr *o;
|
struct libdax_audioxtr *o;
|
||||||
|
|
||||||
o= *xtr= (struct libdax_audioxtr *)malloc(sizeof(struct libdax_audioxtr *));
|
o= *xtr= (struct libdax_audioxtr *) malloc(sizeof(struct libdax_audioxtr));
|
||||||
if(o==NULL)
|
if(o==NULL)
|
||||||
return(-1);
|
return(-1);
|
||||||
strncpy(o->path,path,LIBDAX_AUDIOXTR_STRLEN-1);
|
strncpy(o->path,path,LIBDAX_AUDIOXTR_STRLEN-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user