diff options
author | Stephen Crane <steve.crane@rococosoft.com> | 2004-08-27 14:37:54 +0000 |
---|---|---|
committer | Stephen Crane <steve.crane@rococosoft.com> | 2004-08-27 14:37:54 +0000 |
commit | 49c565df53bf26483c097b511547c203c81f4d41 (patch) | |
tree | e0f05b11b55114acabb25a6344131af56f2e0622 /pand/main.c | |
parent | 885fe862f39efde91f3b5017b8c6019c8c1f6541 (diff) |
fix memory leaks
Diffstat (limited to 'pand/main.c')
-rw-r--r-- | pand/main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pand/main.c b/pand/main.c index 4afc095f..e57c80be 100644 --- a/pand/main.c +++ b/pand/main.c @@ -551,7 +551,6 @@ int main(int argc, char **argv) case 'Q': mode = CONNECT; - dst = NULL; if (optarg) search_duration = atoi(optarg); break; @@ -565,7 +564,6 @@ int main(int argc, char **argv) case 'K': mode = KILL; detach = 0; - dst = NULL; break; case 'S': @@ -700,6 +698,7 @@ int main(int argc, char **argv) strncpy(cache.dst, dst, sizeof(cache.dst) - 1); str2ba(dst, &cache.bdaddr); cache.valid = 1; + free(dst); } switch (mode) { |