]> oss.titaniummirror.com Git - repo_shell.git/blobdiff - repo_shell.c
Big README cleanup; add README.gitacls
[repo_shell.git] / repo_shell.c
index 660c2fd282685927cf53e11e9a049eb14570261f..7ef610d247bf4c22cfd8591de37c93b97f418f99 100644 (file)
@@ -12,6 +12,7 @@
 #include "utility.h"
 #include "version.h"
 #include "git_acl.h"
+#include "stringutils.h"
 
 #define CFG_FILE "/etc/repo_shell.cfg"
 #define SHELL "/bin/bash"
@@ -58,7 +59,7 @@ static char *dequote(char *arg)
 static char *add_prefix(char *prefix, char* arg)
 {
   char *narg = arg;
-        int i;
+  int i;
 
   if (arg && prefix && (i = strlen(prefix))) {
     narg = xmalloc(sizeof(char *) * (i + strlen(arg) + 2));
@@ -113,6 +114,7 @@ static int do_git_cmd(const char *cmd, char *arg, char *user)
 
   ret = execvp(nargv[0], (char *const *) nargv);
   /* Code unreached if execv successful */
+  free((char*)nargv[1]);
   free(narg);
   return ret;
 }