eio: don't free internal data.

SVN revision: 63479
This commit is contained in:
Cedric BAIL 2011-09-19 12:47:02 +00:00
parent 823fa1b566
commit 1a016f1915
2 changed files with 9 additions and 2 deletions

View File

@ -199,6 +199,8 @@ struct _Eio_File_Xattr
int xattr_int; int xattr_int;
} xint; } xint;
} todo; } todo;
Eina_Bool set : 1;
}; };
struct _Eio_File_Progress struct _Eio_File_Progress

View File

@ -112,8 +112,11 @@ _eio_file_xattr_free(Eio_File_Xattr *async)
{ {
eina_stringshare_del(async->path); eina_stringshare_del(async->path);
eina_stringshare_del(async->attribute); eina_stringshare_del(async->attribute);
if (async->op == EIO_XATTR_DATA) free(async->todo.xdata.xattr_data); if (!async->set)
if (async->op == EIO_XATTR_STRING) free(async->todo.xstring.xattr_string); {
if (async->op == EIO_XATTR_DATA) free(async->todo.xdata.xattr_data);
if (async->op == EIO_XATTR_STRING) free(async->todo.xstring.xattr_string);
}
free(async); free(async);
} }
@ -215,6 +218,7 @@ _eio_file_xattr_setup_get(Eio_File_Xattr *async,
{ {
async->path = eina_stringshare_add(path); async->path = eina_stringshare_add(path);
async->attribute = eina_stringshare_add(attribute); async->attribute = eina_stringshare_add(attribute);
async->set = EINA_FALSE;
if (!eio_file_set(&async->common, if (!eio_file_set(&async->common,
NULL, NULL,
@ -240,6 +244,7 @@ _eio_file_xattr_setup_set(Eio_File_Xattr *async,
async->path = eina_stringshare_add(path); async->path = eina_stringshare_add(path);
async->attribute = eina_stringshare_add(attribute); async->attribute = eina_stringshare_add(attribute);
async->flags = flags; async->flags = flags;
async->set = EINA_TRUE;
if (!eio_file_set(&async->common, if (!eio_file_set(&async->common,
done_cb, done_cb,