When a UCI fstab mount config doesn't contain a target option,
a 'block mount' call segfaults when comparing a mount's target (NULL)
to a found mount point returned by find_mount_point()
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
Acked-by: Paul Spooren <mail@aparcar.org>
mp = find_mount_point(pr->dev);
if (mp) {
- if (m && m->type == TYPE_MOUNT && strcmp(m->target, mp)) {
+ if (m && m->type == TYPE_MOUNT && m->target && strcmp(m->target, mp)) {
ULOG_ERR("%s is already mounted on %s\n", pr->dev, mp);
err = -1;
} else