]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Make sure that the hlink node->data allocation doesn't fail.
authorWayne Davison <wayned@samba.org>
Fri, 8 Aug 2008 14:48:41 +0000 (07:48 -0700)
committerWayne Davison <wayned@samba.org>
Fri, 8 Aug 2008 14:48:41 +0000 (07:48 -0700)
hlink.c

diff --git a/hlink.c b/hlink.c
index 5c61170e253336771a8a7fa5abef151304c551ad..fede1537a641b429c08b680d64f61e3d6b192cdc 100644 (file)
--- a/hlink.c
+++ b/hlink.c
@@ -124,7 +124,8 @@ static void match_gnums(int32 *ndx_list, int ndx_count)
                if (inc_recurse) {
                        node = hashtable_find(prior_hlinks, gnum, 1);
                        if (!node->data) {
-                               node->data = new_array0(char, 5);
+                               if (!(node->data = new_array0(char, 5)))
+                                       out_of_memory("match_gnums");
                                assert(gnum >= hlink_flist->ndx_start);
                                file->flags |= FLAG_HLINK_FIRST;
                                prev = -1;