Fix double free 00/232400/1 accepted/tizen/unified/20200510.220446 submit/tizen/20200506.052201 submit/tizen/20200508.070916
authorCheoleun Moon <chleun.moon@samsung.com>
Mon, 4 May 2020 08:01:38 +0000 (17:01 +0900)
committerCheoleun Moon <chleun.moon@samsung.com>
Mon, 4 May 2020 08:01:43 +0000 (17:01 +0900)
A variable, obj_info has been already freed when _hutil_add_object_entry() returns
an error. It leads in double free of obj_info.

Change-Id: I9cca2ef8a4048b2127cf3be751a7c9c73aa62660
Signed-off-by: Cheoleun Moon <chleun.moon@samsung.com>
src/mtp_cmd_handler_util.c

index aa14b0d..7282a49 100644 (file)
@@ -1949,8 +1949,6 @@ ERROR_EXIT:
 #ifdef MTP_SUPPORT_ALBUM_ART
        g_free(alb_buf);
 #endif /* MTP_SUPPORT_ALBUM_ART */
-       if (obj_info != NULL)
-               _entity_dealloc_obj_info(obj_info);
        /* LCOV_EXCL_STOP */
        return resp;
 }