mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-17 02:51:01 +02:00
36906: quite_signals() in ZSH_MEM realloc()
This commit is contained in:
parent
609273875d
commit
81fa9fd25a
2 changed files with 10 additions and 2 deletions
|
@ -1,5 +1,8 @@
|
||||||
2015-10-26 Barton E. Schaefer <schaefer@zsh.org>
|
2015-10-26 Barton E. Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* 36906: Kamil Dudka <kdudka@redhat.com>: Src/mem.c:
|
||||||
|
quite_signals() in ZSH_MEM realloc()
|
||||||
|
|
||||||
* 36968: Src/Modules/db_gdbm.c: use addmodulefd() to tell the
|
* 36968: Src/Modules/db_gdbm.c: use addmodulefd() to tell the
|
||||||
shell about the descriptor of the dbm file
|
shell about the descriptor of the dbm file
|
||||||
|
|
||||||
|
|
|
@ -1668,8 +1668,13 @@ realloc(MALLOC_RET_T p, MALLOC_ARG_T size)
|
||||||
int i, l = 0;
|
int i, l = 0;
|
||||||
|
|
||||||
/* some system..., see above */
|
/* some system..., see above */
|
||||||
if (!p && size)
|
if (!p && size) {
|
||||||
return (MALLOC_RET_T) malloc(size);
|
queue_signals();
|
||||||
|
r = malloc(size);
|
||||||
|
unqueue_signals();
|
||||||
|
return (MALLOC_RET_T) r;
|
||||||
|
}
|
||||||
|
|
||||||
/* and some systems even do this... */
|
/* and some systems even do this... */
|
||||||
if (!p || !size)
|
if (!p || !size)
|
||||||
return (MALLOC_RET_T) p;
|
return (MALLOC_RET_T) p;
|
||||||
|
|
Loading…
Reference in a new issue