summaryrefslogtreecommitdiff
path: root/lib/util/util_runcmd.c
diff options
context:
space:
mode:
authorGarming Sam <garming@catalyst.net.nz>2014-03-14 09:30:52 +1300
committerAndrew Bartlett <abartlet@samba.org>2014-07-07 23:32:35 +0200
commitcafd60732b833caba1e99afbd20be5339be3b4dc (patch)
treebcd18fdf2e7b6abec8ab1d52c28753e0d966f8a3 /lib/util/util_runcmd.c
parent72651f92f0d35c026978e765cd9f8e0867c44af3 (diff)
downloadsamba-cafd60732b833caba1e99afbd20be5339be3b4dc.tar.gz
param: Add null checks for upcoming str_list_make changes
In changing str_list_make to str_list_make_v3, the list can be NULL. These are some additional checks to try to avoid any problems. Where lists are dealt with, they typically check both if the list is empty or the list is NULL. Change-Id: I9012c31dbd9832ce877728bcb3346616ba64c4c5 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
Diffstat (limited to 'lib/util/util_runcmd.c')
-rw-r--r--lib/util/util_runcmd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/util/util_runcmd.c b/lib/util/util_runcmd.c
index c8547de694a..1ec717f5488 100644
--- a/lib/util/util_runcmd.c
+++ b/lib/util/util_runcmd.c
@@ -80,6 +80,10 @@ struct tevent_req *samba_runcmd_send(TALLOC_CTX *mem_ctx,
char **argv;
va_list ap;
+ if (argv0 == NULL) {
+ return NULL;
+ }
+
req = tevent_req_create(mem_ctx, &state,
struct samba_runcmd_state);
if (req == NULL) {