Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89547ce0 authored by Yunlian Jiang's avatar Yunlian Jiang Committed by Joe Onorato
Browse files

fix some memory leaks.

This fixes some warnings like

warning: Potential leak of memory pointed to by 'target'
[clang-analyzer-cplusplus.NewDeleteLeaks]

Bug: None
Test: The warnings are gone.
Change-Id: I3708671bbc9965133439664b766df3236d1b01bf
parent 88ac6d96
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -355,6 +355,7 @@ adb_incident_workaround(const char* adbSerial, const vector<string>& sections)
            args[argpos++] = NULL;
            execvp(args[0], (char*const*)args);
            fprintf(stderr, "execvp failed: %s\n", strerror(errno));
            free(args);
            return 1;
        } else {
            // parent
@@ -400,6 +401,7 @@ adb_incident_workaround(const char* adbSerial, const vector<string>& sections)
        }
    }

    free(buffer);
    return 0;
}