From c9a3fd447c2f03b725cb9d3bf7d48ddf472d8b57 Mon Sep 17 00:00:00 2001 From: Cheoleun Moon Date: Mon, 4 May 2020 17:01:38 +0900 Subject: Fix double free 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 --- src/mtp_cmd_handler_util.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mtp_cmd_handler_util.c b/src/mtp_cmd_handler_util.c index aa14b0d..7282a49 100644 --- a/src/mtp_cmd_handler_util.c +++ b/src/mtp_cmd_handler_util.c @@ -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; } -- cgit v1.2.3