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@xxxxxxxxxx> --- V2: wrappers prevent (sic) both being set, gracefully handle either of the sent-in paths being null. diff --git a/libfrog/paths.c b/libfrog/paths.c index 318b48f..c7895e9 100644 --- a/libfrog/paths.c +++ b/libfrog/paths.c @@ -98,6 +98,9 @@ __fs_table_lookup_mount( 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)) -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html