Module Name:    src
Committed By:   christos
Date:           Fri Sep 16 11:13:47 UTC 2016

Modified Files:
        src/sbin/fsck_lfs: lfs.c

Log Message:
PR/51478: Jose Luis Rodriguez Garcia: Fix leak mem fsck_lfs/lfs.c


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sbin/fsck_lfs/lfs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/fsck_lfs/lfs.c
diff -u src/sbin/fsck_lfs/lfs.c:1.71 src/sbin/fsck_lfs/lfs.c:1.72
--- src/sbin/fsck_lfs/lfs.c:1.71	Sun Mar 20 00:24:46 2016
+++ src/sbin/fsck_lfs/lfs.c	Fri Sep 16 07:13:47 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs.c,v 1.71 2016/03/20 04:24:46 dholland Exp $ */
+/* $NetBSD: lfs.c,v 1.72 2016/09/16 11:13:47 christos Exp $ */
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -376,6 +376,8 @@ lfs_raw_vget(struct lfs * fs, ino_t ino,
 		dip = lfs_ifind(fs, ino, bp);
 		if (dip == NULL) {
 			brelse(bp, 0);
+			free(ip->i_din);
+			free(ip->inode_ext.lfs);
 			free(ip);
 			free(vp);
 			return NULL;

Reply via email to