)]}'
{
  "commit": "2393c944d5d60eedaede80273ede8a816b5fa3e0",
  "tree": "ec828bc121f178194167396aaab5a79852cae695",
  "parents": [
    "9f260e0efa4766e56d0ac14f1aeea6ee5eb8fe83"
  ],
  "author": {
    "name": "Jesper Juhl",
    "email": "jj@chaosbits.net",
    "time": "Sun Dec 26 09:59:58 2010 +0000"
  },
  "committer": {
    "name": "David S. Miller",
    "email": "davem@davemloft.net",
    "time": "Fri Dec 31 11:17:10 2010 -0800"
  },
  "message": "ISDN, Gigaset: Fix memory leak in do_disconnect_req()\n\nHi,\n\nIn drivers/isdn/gigaset/capi.c::do_disconnect_req() we will leak the\nmemory allocated (with kmalloc) to \u0027b3cmsg\u0027 if the call to alloc_skb()\nfails.\n\n...\n\t\tb3cmsg \u003d kmalloc(sizeof(*b3cmsg), GFP_KERNEL);\n\tallocation here ------^\n\t\tif (!b3cmsg) {\n\t\t\tdev_err(cs-\u003edev, \"%s: out of memory\\n\", __func__);\n\t\t\tsend_conf(iif, ap, skb, CAPI_MSGOSRESOURCEERR);\n\t\t\treturn;\n\t\t}\n\t\tcapi_cmsg_header(b3cmsg, ap-\u003eid, CAPI_DISCONNECT_B3, CAPI_IND,\n\t\t\t\t ap-\u003enextMessageNumber++,\n\t\t\t\t cmsg-\u003eadr.adrPLCI | (1 \u003c\u003c 16));\n\t\tb3cmsg-\u003eReason_B3 \u003d CapiProtocolErrorLayer1;\n\t\tb3skb \u003d alloc_skb(CAPI_DISCONNECT_B3_IND_BASELEN, GFP_KERNEL);\n\t\tif (b3skb \u003d\u003d NULL) {\n\t\t\tdev_err(cs-\u003edev, \"%s: out of memory\\n\", __func__);\n\t\t\tsend_conf(iif, ap, skb, CAPI_MSGOSRESOURCEERR);\n\t\t\treturn;\n\tleak here ------^\n...\n\nThis leak is easily fixed by just kfree()\u0027ing the memory allocated to\n\u0027b3cmsg\u0027 right before we return. The following patch does that.\n\nSigned-off-by: Jesper Juhl \u003cjj@chaosbits.net\u003e\nAcked-by: Tilman Schmidt \u003ctilman@imap.cc\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bcc174e4f3b146db6772cea89c79ac9eb14ce80a",
      "old_mode": 33188,
      "old_path": "drivers/isdn/gigaset/capi.c",
      "new_id": "658e75f18d052b5a721ff2e6882109c945318d5b",
      "new_mode": 33188,
      "new_path": "drivers/isdn/gigaset/capi.c"
    }
  ]
}
