diff options
| author | Jesper Hansson <jesper.hansson@sonymobile.com> | 2012-04-27 13:54:27 +0200 |
|---|---|---|
| committer | Johan Redestig <johan.redestig@sonymobile.com> | 2014-11-24 13:35:48 +0100 |
| commit | a9d791f48e3472400ffad73dca88c28fb2f7aaa7 (patch) | |
| tree | a220de8a544047550cd90dba000432b242bc0812 /server/PppController.cpp | |
| parent | ce0b69e25ae35f93ff7253855bf8a38c7fbf0232 (diff) | |
Plug some leaks
Change-Id: I4268ea32cfb0ebd6ce5711e30865750dffa94e92
Diffstat (limited to 'server/PppController.cpp')
| -rw-r--r-- | server/PppController.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/PppController.cpp b/server/PppController.cpp index 6b54c31b..581b9c60 100644 --- a/server/PppController.cpp +++ b/server/PppController.cpp @@ -85,6 +85,8 @@ int PppController::attachPppd(const char *tty, struct in_addr local, char *lr; asprintf(&lr, "%s:%s", l, r); + free(l); + free(r); snprintf(dev, sizeof(dev), "/dev/%s", tty); @@ -94,6 +96,9 @@ int PppController::attachPppd(const char *tty, struct in_addr local, lr, "ms-dns", d1, "ms-dns", d2, "lcp-max-configure", "99999", (char *) NULL)) { ALOGE("execl failed (%s)", strerror(errno)); } + free(lr); + free(d1); + free(d2); ALOGE("Should never get here!"); return 0; } else { |
