If neither dir nor blkdev is set, dpath never gets set,
and then gets used (uninitalized) later on.
If we are asked where "nothing" is mounted, just return
"nowhere."
Fixes-coverity-id:
1433615
Fixes-coverity-id:
1433616
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
char rpath[PATH_MAX];
char dpath[PATH_MAX];
+ if (!dir && !blkdev)
+ return NULL;
+
if (dir && !realpath(dir, dpath))
return NULL;
if (blkdev && !realpath(blkdev, dpath))