From: Taeyoung Kim Date: Tue, 2 Apr 2013 09:09:40 +0000 (+0900) Subject: The problem of error handling for socket is fixed. X-Git-Tag: 2.1b_release^0 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fapi%2Fusb-accessory.git;a=commitdiff_plain;h=0fb5aab8f1efb2d0fa391a0c1e2938b80aab2d45 The problem of error handling for socket is fixed. The parameter of close() cannot be negative value. Signed-off-by: Taeyoung Kim --- diff --git a/src/usb_accessory_private.c b/src/usb_accessory_private.c index 2f2611b..289992f 100644 --- a/src/usb_accessory_private.c +++ b/src/usb_accessory_private.c @@ -287,7 +287,7 @@ gboolean ipc_noti_client_cb(GIOChannel *gioCh, GIOCondition condition, gpointer sockfd = accept(fd, (struct sockaddr *)&clientaddr, (socklen_t *)&clientlen); if (sockfd == -1) { USB_LOG("FAIL: accept()"); - goto out_ipc_fd; + goto out_gio_unref; } if(read_message(sockfd, inbuf, sizeof(inbuf)) < 0) {