From 5beb6fab74b82248bd63318eff47392b9be9b13d Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Tue, 15 Apr 2003 13:22:43 +0000 Subject: [PATCH] Abort if any filter creation fails. --- lib/commands/toolcontext.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c index 889815f57..564658d01 100644 --- a/lib/commands/toolcontext.c +++ b/lib/commands/toolcontext.c @@ -140,7 +140,6 @@ static int _process_config(struct cmd_context *cmd) log_error("Device directory given in config file too long"); return 0; } - #ifdef DEVMAPPER_SUPPORT dm_set_dev_dir(cmd->dev_dir); #endif @@ -273,12 +272,12 @@ static struct dev_filter *_init_filter_components(struct cmd_context *cmd) if (!(f1 = regex_filter_create(cn->v))) { log_error("Failed to create regex device filter"); - return f2; + return NULL; } if (!(f3 = composite_filter_create(2, f1, f2))) { log_error("Failed to create composite device filter"); - return f2; + return NULL; } return f3; -- 2.43.5