diff options
| -rw-r--r-- | utils/mount/parse_dev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/mount/parse_dev.c b/utils/mount/parse_dev.c index 0d3bcb9..2ade5d5 100644 --- a/utils/mount/parse_dev.c +++ b/utils/mount/parse_dev.c @@ -170,7 +170,8 @@ static int nfs_parse_square_bracket(const char *dev, if (pathname) { *pathname = strndup(cbrace, path_len); if (*pathname == NULL) { - free(*hostname); + if (hostname) + free(*hostname); return nfs_pdn_nomem_err(); } } |
