btrfs-progs: fix regexec to only work if we actually have a regexec
authorJosef Bacik <josef@redhat.com>
Fri, 2 Dec 2011 17:52:15 +0000 (12:52 -0500)
committerDavid Sterba <dsterba@suse.cz>
Fri, 9 Aug 2013 12:32:30 +0000 (14:32 +0200)
commit65b01dcc5a6a261227faeaeb7a182a619d1ce4cc
tree55d8ffb2eb8634d2cdac46ce47e2828ff84860a3
parente35450fa53139572afdd759619610cc7f5277626
btrfs-progs: fix regexec to only work if we actually have a regexec

We were unconditionally executing our regular expression, even though we may not
have one, so check to make sure mreg is not null before calling regexec.
Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
cmds-restore.c