diff --git a/proc_parse.c b/proc_parse.c index e83215cde..1634afd86 100644 --- a/proc_parse.c +++ b/proc_parse.c @@ -958,10 +958,8 @@ static int parse_mountinfo_ent(char *str, struct mount_info *new, char **fsname) &new->mnt_id, &new->parent_mnt_id, &kmaj, &kmin, &new->root, new->mountpoint + 1, &opt, &n); - if (ret != 7) { - xfree(new->mountpoint); + if (ret != 7) return -1; - } new->mountpoint = xrealloc(new->mountpoint, strlen(new->mountpoint) + 1);