s3:passdb: Fix the use of uninitialized scalar variable.
authorPoornima Gurusiddaiah <pgurusid@redhat.com>
Fri, 14 Feb 2014 03:56:56 +0000 (03:56 +0000)
committerIra Cooper <ira@samba.org>
Mon, 24 Feb 2014 04:13:44 +0000 (09:43 +0530)
Coverity-id: 1107228,1107227

Signed-off-by: Poornima Gurusiddaiah <pgurusid@redhat.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
source3/passdb/py_passdb.c

index 2d3b6371b31b9aa0d93d4a68f27d583d27e3b5d8..dec45c3a5c44b428372a9c154320e0cf677c940f 100644 (file)
@@ -2483,7 +2483,6 @@ static PyObject *py_pdb_set_account_policy(pytalloc_Object *self, PyObject *args
 static PyObject *py_pdb_search_users(pytalloc_Object *self, PyObject *args)
 {
        TALLOC_CTX *frame = talloc_stackframe();
-       NTSTATUS status;
        struct pdb_methods *methods;
        unsigned int acct_flags;
        struct pdb_search *search;
@@ -2505,9 +2504,7 @@ static PyObject *py_pdb_search_users(pytalloc_Object *self, PyObject *args)
        }
 
        if (!methods->search_users(methods, search, acct_flags)) {
-               PyErr_Format(py_pdb_error, "Unable to search users, (%d,%s)",
-                               NT_STATUS_V(status),
-                               get_friendly_nt_error_msg(status));
+               PyErr_Format(py_pdb_error, "Unable to search users");
                talloc_free(frame);
                return NULL;
        }
@@ -2550,7 +2547,6 @@ static PyObject *py_pdb_search_users(pytalloc_Object *self, PyObject *args)
 static PyObject *py_pdb_search_groups(pytalloc_Object *self)
 {
        TALLOC_CTX *frame = talloc_stackframe();
-       NTSTATUS status;
        struct pdb_methods *methods;
        struct pdb_search *search;
        struct samr_displayentry *entry;
@@ -2566,9 +2562,7 @@ static PyObject *py_pdb_search_groups(pytalloc_Object *self)
        }
 
        if (!methods->search_groups(methods, search)) {
-               PyErr_Format(py_pdb_error, "Unable to search groups, (%d,%s)",
-                               NT_STATUS_V(status),
-                               get_friendly_nt_error_msg(status));
+               PyErr_Format(py_pdb_error, "Unable to search groups");
                talloc_free(frame);
                return NULL;
        }