diff options
author | Colin Watson <cjwatson@debian.org> | 2005-05-25 11:01:01 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2005-05-25 11:01:01 +0000 |
commit | e88de75a1a236779a10e8ccbcc51d25308be8840 (patch) | |
tree | 7495477a2a7d0cac17a9fcded020b6ea816182ef /openbsd-compat/getrrsetbyname.c | |
parent | 30a0f9443782cd9d7308acd09430bf586186aa55 (diff) | |
parent | 5d05471f6657646d1d6500c7c43134462c407ee6 (diff) |
Merge 4.0p1 to the trunk.
Diffstat (limited to 'openbsd-compat/getrrsetbyname.c')
-rw-r--r-- | openbsd-compat/getrrsetbyname.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsd-compat/getrrsetbyname.c b/openbsd-compat/getrrsetbyname.c index 660427c1f..4e869c4df 100644 --- a/openbsd-compat/getrrsetbyname.c +++ b/openbsd-compat/getrrsetbyname.c | |||
@@ -277,7 +277,7 @@ getrrsetbyname(const char *hostname, unsigned int rdclass, | |||
277 | 277 | ||
278 | /* allocate memory for signatures */ | 278 | /* allocate memory for signatures */ |
279 | rrset->rri_sigs = calloc(rrset->rri_nsigs, sizeof(struct rdatainfo)); | 279 | rrset->rri_sigs = calloc(rrset->rri_nsigs, sizeof(struct rdatainfo)); |
280 | if (rrset->rri_sigs == NULL) { | 280 | if (rrset->rri_nsigs > 0 && rrset->rri_sigs == NULL) { |
281 | result = ERRSET_NOMEMORY; | 281 | result = ERRSET_NOMEMORY; |
282 | goto fail; | 282 | goto fail; |
283 | } | 283 | } |