소스 검색

libtorrunner: fix memory leak in child() error path

This avoids leaking memory in case libtorrunner's child() function fails.
Martin Kepplinger 5 년 전
부모
커밋
7ba1f39116
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/tools/tor_runner.c

+ 1 - 0
src/tools/tor_runner.c

@@ -93,6 +93,7 @@ child(const tor_main_configuration_t *cfg)
   int rv = execv(BINDIR "/tor", args);
 
   if (rv < 0) {
+    free(args);
     exit(254);
   } else {
     abort(); /* Unreachable */