diff options
author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2014-10-11 01:44:36 +0300 |
---|---|---|
committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2014-10-11 01:44:36 +0300 |
commit | 38cef685ba3681897bbf088dc0268e980bf5df25 (patch) | |
tree | 3afae3241cf33c8eee85e38149a4e97eeeb36a9d | |
parent | 97ff72048af2fe37f470910e11b133821c3e6c6d (diff) | |
download | netifaces-38cef685ba3681897bbf088dc0268e980bf5df25.tar.gz |
Fix a call to Py_INCREF.
This crashed the interpreter when running netifaces on
a FreeBSD platform.
-rw-r--r-- | netifaces.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/netifaces.c b/netifaces.c index cf14482..0566a7b 100644 --- a/netifaces.c +++ b/netifaces.c @@ -1813,7 +1813,8 @@ gateways (PyObject *self) #ifdef RTF_IFSCOPE PyObject *isdefault = PyBool_FromLong (!(msg->rtm_flags & RTF_IFSCOPE)); #else - PyObject *isdefault = Py_INCREF(Py_True); + Py_INCREF(Py_True); + PyObject *isdefault = Py_True; #endif tuple = PyTuple_Pack (3, pyaddr, pyifname, isdefault); |