diff options
Diffstat (limited to 'lib/libcurses/wresize.c')
-rw-r--r-- | lib/libcurses/wresize.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libcurses/wresize.c b/lib/libcurses/wresize.c index 3d5c1f8c4d1..d50ef2f2a52 100644 --- a/lib/libcurses/wresize.c +++ b/lib/libcurses/wresize.c @@ -35,6 +35,8 @@ static void *doalloc(void *p, size_t n) p = malloc(n); else p = realloc(p, n); + if (p == 0) + errno = ENOMEM; return p; } |