diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-09-30 20:47:58 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-09-30 20:47:58 +0000 |
commit | de198d800b42218a424d44179ea2881d6dfbf975 (patch) | |
tree | 8c1de7020eb5a5d0df125ad4619255f41304d501 /src/or/main.c | |
parent | 364fd1ccdffe4a8f6c46137366e4c673b26b453c (diff) | |
download | tor-de198d800b42218a424d44179ea2881d6dfbf975.tar tor-de198d800b42218a424d44179ea2881d6dfbf975.tar.gz |
Never call free() on tor_malloc()d memory. This is unlikely to be our current leak, but it may help dmalloc work.
svn:r5168
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/main.c b/src/or/main.c index 42b4962ee..836b58556 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -1464,7 +1464,7 @@ nt_torrc_is_present() path_to_torrc = tor_malloc(len); if (tor_snprintf(path_to_torrc, len, "%s%s%s", szDrive, szDir, torrc)<0) { printf("Failed: tor_snprinf()\n"); - free(path_to_torrc); + tor_free(path_to_torrc); return 0; } @@ -1772,7 +1772,7 @@ nt_service_install(void) } if ((hSCManager = nt_service_open_scm()) == NULL) { - free(command); + tor_free(command); return 0; } @@ -1789,7 +1789,7 @@ nt_service_install(void) printf("CreateService() failed : %s\n", errmsg); CloseServiceHandle(hSCManager); LocalFree(errmsg); - free(command); + tor_free(command); return 0; } |