Merge "posix_spawn_file_actions_addopen(): crash early rather than late." am: 6ef483eb87
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2515747 Change-Id: If5064907ea99bce42f2e73c50c5292cb61945031 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
f658816d6b
1 changed files with 1 additions and 1 deletions
|
@ -340,7 +340,7 @@ static int posix_spawn_add_file_action(posix_spawn_file_actions_t* actions,
|
|||
if (action == nullptr) return errno;
|
||||
|
||||
action->next = nullptr;
|
||||
if (path != nullptr) {
|
||||
if (what == kOpen) {
|
||||
action->path = strdup(path);
|
||||
if (action->path == nullptr) {
|
||||
free(action);
|
||||
|
|
Loading…
Reference in a new issue