liblog: fix a memory leak in __android_log_pmsg_file_write()
Free the strdup()-ed filename before returning error. Test: passed clang-tidy checks Bug: none Change-Id: I555492cb4e50400db758f7c721647a8747874a01
This commit is contained in:
parent
8eb237ad57
commit
106c3e6189
|
@ -285,6 +285,7 @@ LIBLOG_ABI_PRIVATE ssize_t __android_log_pmsg_file_write(
|
|||
__android_log_unlock();
|
||||
} else if (pmsgOpen() < 0) {
|
||||
__android_log_unlock();
|
||||
free(cp);
|
||||
return -EBADF;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue