Fix the memory leak 88/244088/2 accepted/tizen/unified/20200916.121741 submit/tizen/20200915.050000
authorYoungHun Kim <yh8004.kim@samsung.com>
Tue, 15 Sep 2020 03:17:35 +0000 (12:17 +0900)
committerYoungHun Kim <yh8004.kim@samsung.com>
Tue, 15 Sep 2020 04:29:40 +0000 (04:29 +0000)
Change-Id: Ia4ac93bb1e5c936812e5ac88aed5f7a1cf6d6526

test/mm_res_manager_test.c

index 4942ea3..2d5dc0d 100644 (file)
@@ -756,8 +756,10 @@ static gboolean input(GIOChannel *channel)
        GString *cmd_line;
 
        cmd_line = g_string_new(NULL);
-       if (g_io_channel_read_line_string(channel, cmd_line, &read_size, &error) != G_IO_STATUS_NORMAL)
+       if (g_io_channel_read_line_string(channel, cmd_line, &read_size, &error) != G_IO_STATUS_NORMAL) {
+               g_string_free(cmd_line, TRUE);
                return TRUE;
+       }
 
        g_strstrip(cmd_line->str);