)]}'
{
  "commit": "474a89885f77953b12bce9f23660c31ef5c2630e",
  "tree": "2da1f0498aa3f93ffb91b2a7305169286976f6cd",
  "parents": [
    "17b7e1ba1e2ecc9a09f5e154e555accd2a2eaedf"
  ],
  "author": {
    "name": "Jesper Juhl",
    "email": "jj@chaosbits.net",
    "time": "Wed Apr 11 22:10:20 2012 +0200"
  },
  "committer": {
    "name": "Greg Kroah-Hartman",
    "email": "gregkh@linuxfoundation.org",
    "time": "Thu Apr 12 14:34:32 2012 -0700"
  },
  "message": "staging: android: fix mem leaks in __persistent_ram_init()\n\nIf, in __persistent_ram_init(), the call to\npersistent_ram_buffer_init() fails or the call to\npersistent_ram_init_ecc() fails then we fail to free the memory we\nallocated to \u0027prz\u0027 with kzalloc() - thus leaking it.\n\nTo prevent the leaks I consolidated all error exits from the function\nat a \u0027err:\u0027 label at the end and made all error cases jump to that\nlabel where we can then make sure we always free \u0027prz\u0027. This is safe\nsince all the situations where the code bails out happen before \u0027prz\u0027\nhas been stored anywhere and although we\u0027ll do a redundant kfree(NULL)\ncall in the case of kzalloc() itself failing that\u0027s OK since kfree()\ndeals gracefully with NULL pointers and I felt it was more important\nto keep all error exits at a single location than to avoid that one\nharmless/redundant kfree() on a error path.\n\nSigned-off-by: Jesper Juhl \u003cjj@chaosbits.net\u003e\nAcked-by: Colin Cross \u003cccross@android.com\u003e\nCc: stable \u003cstable@vger.kernel.org\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@linuxfoundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e08f2574e30a94e7ddf4acff35ccaa4a63df9d2b",
      "old_mode": 33188,
      "old_path": "drivers/staging/android/persistent_ram.c",
      "new_id": "8d8c1e33e0ff11790bea6071cbeb1e9d52b36ecb",
      "new_mode": 33188,
      "new_path": "drivers/staging/android/persistent_ram.c"
    }
  ]
}
