X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fframework%2Ffsapi%2Foperation.c;h=0bdb036bde5f2a17d010e7c92113a3e77e55b151;hb=44cc673a0fa72374b443f1a4b7633d12d44c0716;hp=046b98b4d6287ba5efc7d013d6e2c0af582ef1e3;hpb=9383d80695bb29d80100d40e8b0aeadb78c64c78;p=platform%2Fcore%2Fsystem%2Fsync-agent.git diff --git a/src/framework/fsapi/operation.c b/src/framework/fsapi/operation.c index 046b98b..0bdb036 100755 --- a/src/framework/fsapi/operation.c +++ b/src/framework/fsapi/operation.c @@ -1058,6 +1058,7 @@ int fs_file_md5_hashkey(const char *file_path, unsigned char **hash_key) ret = sync_agent_read_file(file_path, &required_contents, FS_BUFFER_SIZE, &read_file_size, &isFinal); if (ret != 1) { _DEBUG_ERROR("sync_agent_read_file() Fail\n"); + ret = 0; goto return_part; } @@ -1083,8 +1084,17 @@ int fs_file_md5_hashkey(const char *file_path, unsigned char **hash_key) sync_agent_free_file(&required_contents); _EXTERN_FUNC_EXIT; + return ret; return_part: + if (real_md5_word != NULL) { + free(real_md5_word); + real_md5_word = NULL; + } + _DEBUG_INFO("Free Part"); + sync_agent_free_file(&required_contents); + + _EXTERN_FUNC_EXIT; return ret; }