aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdiskfs/fsys-get-children.c2
-rw-r--r--libnetfs/fsys-get-children.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/libdiskfs/fsys-get-children.c b/libdiskfs/fsys-get-children.c
index 7e2a37b1..1c20f1ee 100644
--- a/libdiskfs/fsys-get-children.c
+++ b/libdiskfs/fsys-get-children.c
@@ -60,9 +60,9 @@ diskfs_S_fsys_get_children (struct diskfs_control *fsys,
err = iohelp_return_malloced_buffer ((char *) c, c_count * sizeof *c,
(char **) controls, controlsCnt);
+ c = NULL; /* c was freed by iohelp_return_malloced_buffer. */
if (err)
goto errout;
- c = NULL; /* c was freed by iohelp_return_malloced_buffer. */
*controlsPoly = MACH_MSG_TYPE_MOVE_SEND;
*controlsCnt = c_count;
diff --git a/libnetfs/fsys-get-children.c b/libnetfs/fsys-get-children.c
index c4bd0f15..6a038d23 100644
--- a/libnetfs/fsys-get-children.c
+++ b/libnetfs/fsys-get-children.c
@@ -54,15 +54,15 @@ netfs_S_fsys_get_children (struct netfs_control *fsys,
goto errout;
err = iohelp_return_malloced_buffer (n, n_len, names, names_len);
+ n = NULL; /* n was freed by iohelp_return_malloced_buffer. */
if (err)
goto errout;
- n = NULL; /* n was freed by iohelp_return_malloced_buffer. */
err = iohelp_return_malloced_buffer ((char *) c, c_count * sizeof *c,
(char **) controls, controlsCnt);
+ c = NULL; /* c was freed by iohelp_return_malloced_buffer. */
if (err)
goto errout;
- c = NULL; /* c was freed by iohelp_return_malloced_buffer. */
*controlsPoly = MACH_MSG_TYPE_MOVE_SEND;
*controlsCnt = c_count;