From: Richard W.M. Jones Date: Tue, 7 Dec 2010 13:29:40 +0000 (+0000) Subject: fuse: Fix segfault in guestmount --verbose. X-Git-Tag: 1.7.20~11 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=97cbb842362e2548a59a1560c50e5f998fa5bda8;p=libguestfs.git fuse: Fix segfault in guestmount --verbose. If hash_delete returns NULL and --verbose option was given then this would cause a segfault. --- diff --git a/fuse/dircache.c b/fuse/dircache.c index 157035e..8cff0d3 100644 --- a/fuse/dircache.c +++ b/fuse/dircache.c @@ -384,7 +384,7 @@ lsc_remove (Hash_table *ht, const char *pathname, Hash_data_freer freer) entry = hash_delete (ht, &key); - if (verbose) + if (verbose && entry) fprintf (stderr, "dir cache: invalidating entry %p (%s)\n", entry, entry->pathname);