X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fbluetooth%2Fcmtp%2Fcapi.c;fp=net%2Fbluetooth%2Fcmtp%2Fcapi.c;h=18910ffa99cdb562ddda32f9f40c589734756da3;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=ab166b48ce8dc02c8288b44d21d4d9c5ce7b2d22;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/net/bluetooth/cmtp/capi.c b/net/bluetooth/cmtp/capi.c index ab166b48c..18910ffa9 100644 --- a/net/bluetooth/cmtp/capi.c +++ b/net/bluetooth/cmtp/capi.c @@ -20,6 +20,7 @@ SOFTWARE IS DISCLAIMED. */ +#include #include #include @@ -75,13 +76,15 @@ static struct cmtp_application *cmtp_application_add(struct cmtp_session *session, __u16 appl) { - struct cmtp_application *app = kzalloc(sizeof(*app), GFP_KERNEL); + struct cmtp_application *app = kmalloc(sizeof(*app), GFP_KERNEL); BT_DBG("session %p application %p appl %d", session, app, appl); if (!app) return NULL; + memset(app, 0, sizeof(*app)); + app->state = BT_OPEN; app->appl = appl;