l2tp: don't use inet_shutdown on ppp session destroy
[pandora-kernel.git] / fs / ubifs / journal.c
index 34b1679..562e84d 100644 (file)
@@ -573,7 +573,7 @@ int ubifs_jnl_update(struct ubifs_info *c, const struct inode *dir,
        aligned_dlen = ALIGN(dlen, 8);
        aligned_ilen = ALIGN(ilen, 8);
        len = aligned_dlen + aligned_ilen + UBIFS_INO_NODE_SZ;
-       dent = kmalloc(len, GFP_NOFS);
+       dent = kzalloc(len, GFP_NOFS);
        if (!dent)
                return -ENOMEM;
 
@@ -669,6 +669,7 @@ out_free:
 
 out_release:
        release_head(c, BASEHD);
+       kfree(dent);
 out_ro:
        ubifs_ro_mode(c, err);
        if (last_reference)
@@ -958,7 +959,7 @@ int ubifs_jnl_rename(struct ubifs_info *c, const struct inode *old_dir,
        len = aligned_dlen1 + aligned_dlen2 + ALIGN(ilen, 8) + ALIGN(plen, 8);
        if (old_dir != new_dir)
                len += plen;
-       dent = kmalloc(len, GFP_NOFS);
+       dent = kzalloc(len, GFP_NOFS);
        if (!dent)
                return -ENOMEM;
 
@@ -1306,7 +1307,7 @@ int ubifs_jnl_delete_xattr(struct ubifs_info *c, const struct inode *host,
        hlen = host_ui->data_len + UBIFS_INO_NODE_SZ;
        len = aligned_xlen + UBIFS_INO_NODE_SZ + ALIGN(hlen, 8);
 
-       xent = kmalloc(len, GFP_NOFS);
+       xent = kzalloc(len, GFP_NOFS);
        if (!xent)
                return -ENOMEM;
 
@@ -1413,7 +1414,7 @@ int ubifs_jnl_change_xattr(struct ubifs_info *c, const struct inode *inode,
        aligned_len1 = ALIGN(len1, 8);
        aligned_len = aligned_len1 + ALIGN(len2, 8);
 
-       ino = kmalloc(aligned_len, GFP_NOFS);
+       ino = kzalloc(aligned_len, GFP_NOFS);
        if (!ino)
                return -ENOMEM;