summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2009-06-19 11:14:47 +0200
committerDavid Sommerseth <davids@redhat.com>2009-06-19 11:14:47 +0200
commitd7376531310a92837dff47f9b0b130bb529c490b (patch)
tree6139f2fa3ffee16a07dab3e72bed6bf399f1e2b1
parent849627808ac2c20f5baec6431c4ee65547c11ecc (diff)
downloadpython-dmidecode-d7376531310a92837dff47f9b0b130bb529c490b.tar.gz
python-dmidecode-d7376531310a92837dff47f9b0b130bb529c490b.tar.xz
python-dmidecode-d7376531310a92837dff47f9b0b130bb529c490b.zip
Fixed missing check which caused SEGV on Python2.3
Could also be related to an older libxml2 version as well, as this behaviour was found on RHEL4u4
-rw-r--r--src/xmlpythonizer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xmlpythonizer.c b/src/xmlpythonizer.c
index 47590dd..6704d1b 100644
--- a/src/xmlpythonizer.c
+++ b/src/xmlpythonizer.c
@@ -866,7 +866,7 @@ PyObject *_deep_pythonize(PyObject *retdata, ptzMAP *map_p, xmlNode *data_n, int
xpo = _get_xpath_values(xpctx, map_p->value);
if( xpo != NULL ) {
if( _get_key_value(key, 256, map_p, xpctx, 0) != NULL ) {
- if( xpo->nodesetval->nodeNr > 0 ) {
+ if( (xpo->nodesetval != NULL) && (xpo->nodesetval->nodeNr > 0) ) {
value = PyList_New(0);
// If we're working on a fixed list, create one which contains