[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] dev-mornfall-nix - toolcontext: Deal with NULL cmd->filter gracefully.



Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=0e3a2d44241d3b688714025f862700ad2dfdcf69
Commit:        0e3a2d44241d3b688714025f862700ad2dfdcf69
Parent:        b71acdcdaf36f0456ae20f7b014bdcfe5f70a590
Author:        Petr Rockai <prockai redhat com>
AuthorDate:    Mon May 27 02:13:23 2013 +0200
Committer:     Petr Rockai <prockai redhat com>
CommitterDate: Mon May 27 02:13:23 2013 +0200

toolcontext: Deal with NULL cmd->filter gracefully.

---
 lib/commands/toolcontext.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index 3b0d96e..af1aa63 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -1652,7 +1652,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
 	struct dm_config_tree *cft_cmdline;
 	FILE *new_stream;
 
-	if (cmd->dump_filter && cmd->filter->dump)
+	if (cmd->dump_filter && cmd->filter && cmd->filter->dump)
 		cmd->filter->dump(cmd->filter);
 
 	archive_exit(cmd);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]