diff options
-rw-r--r-- | source4/scripting/python/modules.c | 8 |
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; |