Fix typo
[platform/core/connectivity/bluetooth-frwk.git] / bt-oal / oal-socket.c
index 6945084..0d3fe43 100755 (executable)
@@ -359,11 +359,12 @@ int socket_connect(oal_sock_type_t sock_type, oal_uuid_t *p_uuid, int channel, b
                                BTSOCK_RFCOMM, NULL, channel, &sock_fd, 0);
                break;
        default:
-               BT_ERR("Socket type: %d not supported");
+               BT_ERR("Socket type: %d not supported", sock_type);
        }
 
        if (sock_fd < 0) {
                BT_ERR("Bluetooth socket connect failed");
+               g_free(p_oal_client_info);
                return sock_fd;
        }
 
@@ -403,7 +404,7 @@ int socket_listen(oal_sock_type_t sock_type, oal_uuid_t *p_uuid, char *svc_name,
                                        svc_name, p_uuid->uuid, channel, &sock_fd, 0);
                break;
        default:
-               BT_ERR("Socket type: %d not supported");
+               BT_ERR("Socket type: %d not supported", sock_type);
        }
 
        if (sock_fd < 0 || ret != BT_STATUS_SUCCESS) {