From 09e1b0d628cd84a61ee1d3bad8aceb38ca0518e4 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sun, 7 Dec 2008 19:55:28 -0800 Subject: [PATCH] Fix seg-fault in recent 'hammer cleanup' utility work. Reported-by: Rumko --- sbin/hammer/cmd_cleanup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/hammer/cmd_cleanup.c b/sbin/hammer/cmd_cleanup.c index 836628639b..ef4e448eef 100644 --- a/sbin/hammer/cmd_cleanup.c +++ b/sbin/hammer/cmd_cleanup.c @@ -511,7 +511,7 @@ cleanup_softlinks(const char *path __unused, const char *snapshots_path, char *fpath; int anylink = 0; - if (strstr(arg3, "any") != NULL) + if (arg3 != NULL && strstr(arg3, "any") != NULL) anylink = 1; if ((dir = opendir(snapshots_path)) != NULL) { -- 2.41.0