Re: [PATCH v1 2/2] backup_ptes: fix leak on realloc failure

2023-02-24 Thread Andrew Cooper
On 24/02/2023 1:36 pm, Edwin Török wrote: > From: Edwin Török > > From `man 2 realloc`: > `If realloc() fails, the original block is left untouched; it is not freed or > moved.` > > Found using GCC -fanalyzer: > ``` > | 184 | backup->entries = realloc(backup->entries, > | |

[PATCH v1 2/2] backup_ptes: fix leak on realloc failure

2023-02-24 Thread Edwin Török
From: Edwin Török >From `man 2 realloc`: `If realloc() fails, the original block is left untouched; it is not freed or moved.` Found using GCC -fanalyzer: ``` | 184 | backup->entries = realloc(backup->entries, | | ~~ | |