diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-01-02 02:18:43 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-01-02 02:18:43 +0100 |
commit | 293058a2a316e9acaf637f4a7430a13e8c04d672 (patch) | |
tree | e1283fdbf3e22eee31948415388c9520da715fc6 /libdiskfs | |
parent | 99c20c07ab7685744acc91076e3f474b7d95f67c (diff) | |
download | hurd-293058a2a316e9acaf637f4a7430a13e8c04d672.tar.gz hurd-293058a2a316e9acaf637f4a7430a13e8c04d672.tar.bz2 hurd-293058a2a316e9acaf637f4a7430a13e8c04d672.zip |
fsys_get_children: Fix double-free on error
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/fsys-get-children.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libdiskfs/fsys-get-children.c b/libdiskfs/fsys-get-children.c index 8cc4d2cd..81ebf032 100644 --- a/libdiskfs/fsys-get-children.c +++ b/libdiskfs/fsys-get-children.c @@ -54,9 +54,9 @@ diskfs_S_fsys_get_children (struct diskfs_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); |