Fix 'zpool create' segfault due to bad syntax
authorJorgen Lundman <lundman@lundman.net>
Thu, 29 Nov 2012 05:56:07 +0000 (14:56 +0900)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 4 Dec 2012 19:15:25 +0000 (11:15 -0800)
Incorrect syntax should never cause a segfault.  In this case
listing multiple comma delimited options after '-o' triggered
the problem.  For example:

  zpool create -o ashift=12,listsnaps=on

This patch resolves the issue by wrapping the calls which use
hdr with a NULL test.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1118


No differences found