diff options
author | Mythri Alle <mythria@google.com> | 2023-01-25 15:46:54 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-01-25 15:46:54 +0000 |
commit | 6e0382981058446503efddd7c970111e59c7e550 (patch) | |
tree | 73eb518861d418afcea38b8da874b549da1c8034 | |
parent | 76cdbd342102dcada250884df5f8c93a45a46608 (diff) | |
parent | eaf83c4418b00909263da9dc9b273eafe2be7fd1 (diff) | |
download | dalvik-6e0382981058446503efddd7c970111e59c7e550.tar.gz |
Merge "Exit early if ensureCapacity is unable to allocate the required capacity"
-rw-r--r-- | tools/hprof-conv/HprofConv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/hprof-conv/HprofConv.c b/tools/hprof-conv/HprofConv.c index c8847c944..ff49428af 100644 --- a/tools/hprof-conv/HprofConv.c +++ b/tools/hprof-conv/HprofConv.c @@ -182,7 +182,7 @@ static int ebEnsureCapacity(ExpandBuf* pBuf, int size) unsigned char* newStorage = realloc(pBuf->storage, newSize); if (newStorage == NULL) { fprintf(stderr, "ERROR: realloc failed on size=%d\n", newSize); - return -1; + exit(1); } pBuf->storage = newStorage; |