summaryrefslogtreecommitdiff
path: root/src/lib/eio
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-08-30 16:31:41 -0700
committerCedric BAIL <cedric@osg.samsung.com>2016-09-08 15:16:43 -0700
commitd7fbd6f13ef0f32838db89f331790edbeb8a2bf1 (patch)
tree8382ec8b915e3420df1a419dc9c7104bc5790782 /src/lib/eio
parentf1c8c82e5f5cac217e2aa9c6aad90f1cdfb8fbd5 (diff)
eio: fix allocation in eio_dir to reuse common safer infra.
Diffstat (limited to 'src/lib/eio')
-rw-r--r--src/lib/eio/eio_dir.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/eio/eio_dir.c b/src/lib/eio/eio_dir.c
index e275ae9f70..74237747a4 100644
--- a/src/lib/eio/eio_dir.c
+++ b/src/lib/eio/eio_dir.c
@@ -791,7 +791,7 @@ eio_dir_copy(const char *source,
791 EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL); 791 EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL);
792 EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL); 792 EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL);
793 793
794 copy = malloc(sizeof(Eio_Dir_Copy)); 794 copy = eio_common_alloc(sizeof(Eio_Dir_Copy));
795 EINA_SAFETY_ON_NULL_RETURN_VAL(copy, NULL); 795 EINA_SAFETY_ON_NULL_RETURN_VAL(copy, NULL);
796 796
797 copy->progress.op = EIO_DIR_COPY; 797 copy->progress.op = EIO_DIR_COPY;
@@ -832,7 +832,7 @@ eio_dir_move(const char *source,
832 EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL); 832 EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL);
833 EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL); 833 EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL);
834 834
835 move = malloc(sizeof(Eio_Dir_Copy)); 835 move = eio_common_alloc(sizeof(Eio_Dir_Copy));
836 EINA_SAFETY_ON_NULL_RETURN_VAL(move, NULL); 836 EINA_SAFETY_ON_NULL_RETURN_VAL(move, NULL);
837 837
838 move->progress.op = EIO_DIR_MOVE; 838 move->progress.op = EIO_DIR_MOVE;
@@ -871,7 +871,7 @@ eio_dir_unlink(const char *path,
871 EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL); 871 EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL);
872 EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL); 872 EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL);
873 873
874 rmrf = malloc(sizeof(Eio_Dir_Copy)); 874 rmrf = eio_common_alloc(sizeof(Eio_Dir_Copy));
875 EINA_SAFETY_ON_NULL_RETURN_VAL(rmrf, NULL); 875 EINA_SAFETY_ON_NULL_RETURN_VAL(rmrf, NULL);
876 876
877 rmrf->progress.op = EIO_UNLINK; 877 rmrf->progress.op = EIO_UNLINK;
@@ -911,7 +911,7 @@ _eio_dir_stat_internal_ls(const char *dir,
911 EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL); 911 EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL);
912 EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL); 912 EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL);
913 913
914 async = malloc(sizeof(Eio_File_Dir_Ls)); 914 async = eio_common_alloc(sizeof(Eio_File_Dir_Ls));
915 EINA_SAFETY_ON_NULL_RETURN_VAL(async, NULL); 915 EINA_SAFETY_ON_NULL_RETURN_VAL(async, NULL);
916 916
917 /* Eio_Filter_Direct_Cb must be casted to Eio_Filter_Dir_Cb here 917 /* Eio_Filter_Direct_Cb must be casted to Eio_Filter_Dir_Cb here
@@ -984,7 +984,7 @@ _eio_dir_direct_internal_ls(const char *dir,
984 EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL); 984 EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL);
985 EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL); 985 EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL);
986 986
987 async = malloc(sizeof(Eio_File_Dir_Ls)); 987 async = eio_common_alloc(sizeof(Eio_File_Dir_Ls));
988 EINA_SAFETY_ON_NULL_RETURN_VAL(async, NULL); 988 EINA_SAFETY_ON_NULL_RETURN_VAL(async, NULL);
989 989
990 async->ls.directory = eina_stringshare_add(dir); 990 async->ls.directory = eina_stringshare_add(dir);