Commit 79e0b37c authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Pavel Emelyanov

parse_mountinfo_ent: xrealloc(new->mountpoint) can fail

This is pure theoretical, especially in this particular case when we
actually want to (likely) free the unused memory. Still the code which
ignores potential error doesn't look good.
Signed-off-by: 's avatarOleg Nesterov <oleg@redhat.com>
Reviewed-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 69600335
......@@ -962,6 +962,8 @@ static int parse_mountinfo_ent(char *str, struct mount_info *new, char **fsname)
goto err;
new->mountpoint = xrealloc(new->mountpoint, strlen(new->mountpoint) + 1);
if (!new->mountpoint)
goto err;
new->s_dev = MKKDEV(kmaj, kmin);
new->flags = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment