Steve Grubb d05091
diff -ur /home/mitr/a/audit-1.6/bindings/python/auparse_python.c audit-1.6/bindings/python/auparse_python.c
Steve Grubb d05091
--- /home/mitr/a/audit-1.6/bindings/python/auparse_python.c	2007-05-30 22:37:40.000000000 +0200
Steve Grubb d05091
+++ audit-1.6/bindings/python/auparse_python.c	2007-08-29 18:03:35.000000000 +0200
Steve Grubb d05091
@@ -57,8 +57,8 @@
Steve Grubb d05091
 {
Steve Grubb d05091
     if (self->sec == NULL) {
Steve Grubb d05091
         if ((self->sec = PyInt_FromLong(self->event.sec)) == NULL) return NULL;
Steve Grubb d05091
-        Py_INCREF(self->sec);
Steve Grubb d05091
     }
Steve Grubb d05091
+    Py_INCREF(self->sec);
Steve Grubb d05091
     return self->sec;
Steve Grubb d05091
 }
Steve Grubb d05091
 
Steve Grubb d05091
@@ -67,8 +67,8 @@
Steve Grubb d05091
 {
Steve Grubb d05091
     if (self->milli == NULL) {
Steve Grubb d05091
         if ((self->milli = PyInt_FromLong(self->event.milli)) == NULL) return NULL;
Steve Grubb d05091
-        Py_INCREF(self->milli);
Steve Grubb d05091
     }
Steve Grubb d05091
+    Py_INCREF(self->milli);
Steve Grubb d05091
     return self->milli;
Steve Grubb d05091
 }
Steve Grubb d05091
 
Steve Grubb d05091
@@ -77,8 +77,8 @@
Steve Grubb d05091
 {
Steve Grubb d05091
     if (self->serial == NULL) {
Steve Grubb d05091
         if ((self->serial = PyInt_FromLong(self->event.serial)) == NULL) return NULL;
Steve Grubb d05091
-        Py_INCREF(self->serial);
Steve Grubb d05091
     }
Steve Grubb d05091
+    Py_INCREF(self->serial);
Steve Grubb d05091
     return self->serial;
Steve Grubb d05091
 }
Steve Grubb d05091
 
Steve Grubb d05091
@@ -88,7 +88,9 @@
Steve Grubb d05091
     if (self->event.host == NULL) {
Steve Grubb d05091
         Py_RETURN_NONE;
Steve Grubb d05091
     } else {
Steve Grubb d05091
-        if ((self->host = PyString_FromString(self->event.host)) == NULL) return NULL;
Steve Grubb d05091
+	if (self->host == NULL) {
Steve Grubb d05091
+	    if ((self->host = PyString_FromString(self->event.host)) == NULL) return NULL;
Steve Grubb d05091
+	}
Steve Grubb d05091
         Py_INCREF(self->host);
Steve Grubb d05091
         return self->host;
Steve Grubb d05091
     }