summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-05-27 17:36:33 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-05-28 10:04:47 +0200
commit67b2c424cefbecfe8581044703ba178c61c0ece1 (patch)
tree28fc4a9620175fdd87a13700f52a14caa812e285
parente831af7f076fe464d8860535ecae1986299765bd (diff)
downloadsamba-67b2c424cefbecfe8581044703ba178c61c0ece1.tar.gz
samba-67b2c424cefbecfe8581044703ba178c61c0ece1.tar.bz2
samba-67b2c424cefbecfe8581044703ba178c61c0ece1.zip
s4:scripting/python/modules.c - fix "asprintf" calls
-rw-r--r--source4/scripting/python/modules.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/scripting/python/modules.c b/source4/scripting/python/modules.c
index 788df91bb4..6cc3ca58d2 100644
--- a/source4/scripting/python/modules.c
+++ b/source4/scripting/python/modules.c
@@ -94,14 +94,18 @@ bool py_update_path(const char *bindir)
return false;
}
- asprintf(&newpath, "%s/../scripting/python", bindir);
+ if (asprintf(&newpath, "%s/../scripting/python", bindir) < 0) {
+ return false;
+ }
if (!PySys_PathPrepend(py_path, newpath)) {
free(newpath);
return false;
}
free(newpath);
- asprintf(&newpath, "%s/python", bindir);
+ if (asprintf(&newpath, "%s/python", bindir) < 0) {
+ return false;
+ }
if (!PySys_PathPrepend(py_path, newpath)) {
free(newpath);
return false;