diff options
author | Tim Beale <timbeale@catalyst.net.nz> | 2019-01-17 10:52:24 +1300 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-01-26 00:53:10 +0100 |
commit | 8c097b4a3177c8c5786ed599fe7c39ce8421fb2c (patch) | |
tree | a25ade2613aec636e060f65d6cdc647cae2e720c /source3/libsmb | |
parent | d93f901ed7d4b21693273e43dcc59aac2304513b (diff) | |
download | samba-8c097b4a3177c8c5786ed599fe7c39ce8421fb2c.tar.gz |
s3:pylibsmb: Initialize pointers to NULL in new API code
Fix a few uninitialized pointers that managed to sneak through review.
Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/pylibsmb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c index b4903a9b8c5..629ff0a4fd3 100644 --- a/source3/libsmb/pylibsmb.c +++ b/source3/libsmb/pylibsmb.c @@ -1223,7 +1223,7 @@ static PyObject *py_cli_list(struct py_cli_state *self, char *user_mask = NULL; unsigned int attribute = LIST_ATTRIBUTE_MASK; NTSTATUS status; - PyObject *result; + PyObject *result = NULL; const char *kwlist[] = { "directory", "mask", "attribs", NULL }; if (!ParseTupleAndKeywords(args, kwds, "z|sH:list", kwlist, @@ -1313,7 +1313,7 @@ static NTSTATUS remove_dir(struct py_cli_state *self, const char *dirname) static PyObject *py_smb_rmdir(struct py_cli_state *self, PyObject *args) { NTSTATUS status; - const char *dirname; + const char *dirname = NULL; if (!PyArg_ParseTuple(args, "s:rmdir", &dirname)) { return NULL; @@ -1331,7 +1331,7 @@ static PyObject *py_smb_rmdir(struct py_cli_state *self, PyObject *args) static PyObject *py_smb_mkdir(struct py_cli_state *self, PyObject *args) { NTSTATUS status; - const char *dirname; + const char *dirname = NULL; if (!PyArg_ParseTuple(args, "s:mkdir", &dirname)) { return NULL; @@ -1379,7 +1379,7 @@ static bool check_dir_path(struct py_cli_state *self, const char *path) static PyObject *py_smb_chkpath(struct py_cli_state *self, PyObject *args) { - const char *path; + const char *path = NULL; bool dir_exists; if (!PyArg_ParseTuple(args, "s:chkpath", &path)) { |