Fix memory leak 55/114555/1 accepted/tizen/3.0/common/20170214.180929 accepted/tizen/3.0/ivi/20170214.092207 accepted/tizen/3.0/mobile/20170214.091925 accepted/tizen/3.0/tv/20170214.091959 accepted/tizen/3.0/wearable/20170214.092045 submit/tizen_3.0/20170214.043331
authorHyunho Kang <hhstark.kang@samsung.com>
Wed, 8 Feb 2017 12:25:55 +0000 (21:25 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Tue, 14 Feb 2017 04:32:15 +0000 (20:32 -0800)
Change-Id: I3745bd700358c9435138cd73be5fa42b959164e0
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
(cherry picked from commit 7612ac5efa8dbe20c38557db172f195e9c03a525)

src/message-port.c

index 98074a9..e7b2bfc 100755 (executable)
@@ -715,6 +715,8 @@ message_port_pkt_s *__message_port_recv_raw(int fd)
 
        if (__read_string_from_socket(fd, (char **)&pkt->data, &pkt->data_len) != MESSAGEPORT_ERROR_NONE) {
                LOGE("read socket fail: data");
+               if (pkt->data)
+                       free(pkt->data);
                free(pkt->remote_port_name);
                free(pkt);
                return NULL;