diff --git a/src/util/util.c b/src/util/util.c index c337aa9ef8e287f8fbb756ced71a8953dec866e8..37472bb8a55af9a30cba5acc7b68d2a02c970ab1 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -568,6 +568,10 @@ __virExec(const char *const*argv, } *retpid = pid; + + if (binary != argv[0]) + VIR_FREE(binary); + return 0; }