mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
copy: exit immediately upon failure to allocate hash memory
* src/copy.c (dest_info_init, src_info_init): Terminate immediately upon memory exhaustion.
This commit is contained in:
1 parent
ea9af99234
commit
f1d2e8e289
1 file changed
+4
@@ -1953,6 +1953,8 @@ dest_info_init (struct cp_options *x)
|
||||
triple_hash,
|
||||
triple_compare,
|
||||
triple_free);
|
||||
if (! x->dest_info)
|
||||
xalloc_die();
|
||||
}
|
||||
|
||||
/* Initialize the hash table implementing a set of F_triple entries
|
||||
@@ -1975,6 +1977,8 @@ src_info_init (struct cp_options *x)
|
||||
triple_hash_no_name,
|
||||
triple_compare,
|
||||
triple_free);
|
||||
if (! x->src_info)
|
||||
xalloc_die();
|
||||
}
|
||||
|
||||
/* When effecting a move (e.g., for mv(1)), and given the name DST_NAME
|
||||
|
||||
Reference in new issue
Block a user