summaryrefslogtreecommitdiff
path: root/typewrappers.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2013-12-11 16:12:14 +0000
committerDaniel P. Berrange <berrange@redhat.com>2013-12-11 16:12:14 +0000
commitbb3301ba7851de2e00e8a6162bcc4282db7cf75e (patch)
tree1151f58f6e52a1bd3078598c444d63d38a1e1ce2 /typewrappers.c
parent6ea5be0dd21062a53e896887b162fb303a833d84 (diff)
downloadlibvirt-python-bb3301ba7851de2e00e8a6162bcc4282db7cf75e.tar.gz
Don't free passed in args in libvirt_charPtrWrap / libvirt_charPtrSizeWrap
Functions should not make assumptions about the memory management callers use for parameters Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'typewrappers.c')
-rw-r--r--typewrappers.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/typewrappers.c b/typewrappers.c
index 1622986..7b644a1 100644
--- a/typewrappers.c
+++ b/typewrappers.c
@@ -85,7 +85,6 @@ libvirt_charPtrSizeWrap(char *str, Py_ssize_t size)
return Py_None;
}
ret = PyString_FromStringAndSize(str, size);
- VIR_FREE(str);
return ret;
}
@@ -99,7 +98,6 @@ libvirt_charPtrWrap(char *str)
return Py_None;
}
ret = PyString_FromString(str);
- VIR_FREE(str);
return ret;
}