OSDN Git Service

gobex: fix not handling unkown transport type
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 26 Aug 2011 09:49:31 +0000 (12:49 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 4 Dec 2012 21:22:02 +0000 (22:22 +0100)
gobex/gobex.c

index ff35830..7c2fbcc 100644 (file)
@@ -884,6 +884,9 @@ GObex *g_obex_new(GIOChannel *io, GObexTransportType transport_type,
                obex->read = read_packet;
                obex->write = write_packet;
                break;
+       default:
+               g_obex_unref(obex);
+               return NULL;
        }
 
        g_io_channel_set_encoding(io, NULL, NULL);