Thread (24 messages) 24 messages, 3 authors, 2011-11-02
STALE5354d

[PATCH 07/19] Grow_restart(): free() offsets after use

From: <hidden>
Date: 2011-11-01 15:09:23
Subsystem: the rest · Maintainer: Linus Torvalds

From: Jes Sorensen <redacted>

Signed-off-by: Jes Sorensen <redacted>
---
 Grow.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Grow.c b/Grow.c
index 93a1fba..af61fc3 100644
--- a/Grow.c
+++ b/Grow.c
@@ -3578,6 +3578,7 @@ int Grow_restart(struct supertype *st, struct mdinfo *info, int *fdlist, int cnt
 			if (verbose)
 				fprintf(stderr, Name ": Error restoring backup from %s\n",
 					devname);
+			free(offsets);
 			return 1;
 		}
 		
@@ -3595,9 +3596,11 @@ int Grow_restart(struct supertype *st, struct mdinfo *info, int *fdlist, int cnt
 			if (verbose)
 				fprintf(stderr, Name ": Error restoring second backup from %s\n",
 					devname);
+			free(offsets);
 			return 1;
 		}
 
+		free(offsets);
 
 		/* Ok, so the data is restored. Let's update those superblocks. */
 
-- 
1.7.6.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help