diff options
Diffstat (limited to 'typewrappers.c')
-rw-r--r-- | typewrappers.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/typewrappers.c b/typewrappers.c index 9021ce3..3f200b3 100644 --- a/typewrappers.c +++ b/typewrappers.c @@ -2,7 +2,7 @@ * types.c: converter functions between the internal representation * and the Python objects * - * Copyright (C) 2005, 2007 Red Hat, Inc. + * Copyright (C) 2005, 2007, 2012 Red Hat, Inc. * * Daniel Veillard <veillard@redhat.com> */ @@ -16,6 +16,8 @@ #include "typewrappers.h" +#include "memory.h" + #ifndef Py_CAPSULE_H typedef void(*PyCapsule_Destructor)(void *, void *); #endif @@ -86,7 +88,7 @@ libvirt_charPtrSizeWrap(char *str, Py_ssize_t size) return (Py_None); } ret = PyString_FromStringAndSize(str, size); - free(str); + VIR_FREE(str); return (ret); } @@ -100,7 +102,7 @@ libvirt_charPtrWrap(char *str) return (Py_None); } ret = PyString_FromString(str); - free(str); + VIR_FREE(str); return (ret); } |