From: Jelmer Vernooij Date: Thu, 17 May 2012 21:48:26 +0000 (+0200) Subject: pygensec: Fix init of variable if not specified. X-Git-Tag: samba-4.0.0alpha21~84 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=01c502ddd41857e2dea9a01ac4afbe48e5ea1fdd;p=thirdparty%2Fsamba.git pygensec: Fix init of variable if not specified. Thanks to Wolfgang Sourdeau for reporting this. Bug: https://bugzilla.samba.org/show_bug.cgi?id=8946 Autobuild-User: Jelmer Vernooij Autobuild-Date: Fri May 18 04:50:17 CEST 2012 on sn-devel-104 --- diff --git a/source4/auth/gensec/pygensec.c b/source4/auth/gensec/pygensec.c index 5a8744db963..a991aef8699 100644 --- a/source4/auth/gensec/pygensec.c +++ b/source4/auth/gensec/pygensec.c @@ -81,7 +81,7 @@ static PyObject *py_gensec_start_client(PyTypeObject *type, PyObject *args, PyOb pytalloc_Object *self; struct gensec_settings *settings; const char *kwnames[] = { "settings", NULL }; - PyObject *py_settings; + PyObject *py_settings = Py_None; struct gensec_security *gensec; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O", discard_const_p(char *, kwnames), &py_settings))