From: Tom Yu Date: Thu, 30 Nov 2006 21:24:07 +0000 (+0000) Subject: pull up r18865 from trunk X-Git-Tag: krb5-1.6-beta1~17 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=78c19d0c4cd35a45ce3453e341c400435c99e951;p=krb5.git pull up r18865 from trunk r18865@cathode-dark-space: tlyu | 2006-11-27 23:57:55 -0500 ticket: new target_version: 1.6 tags: pullup subject: krb5int_copy_data_contents shouldn't free memory it didn't allocate component: krb5-libs * src/lib/krb5/krb/copy_data.c (krb5int_copy_data_contents): Don't free outdata on malloc failure; we didn't allocate outdata. ticket: 4928 version_fixed: 1.6 git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@18883 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/copy_data.c b/src/lib/krb5/krb/copy_data.c index 1be2a2da5..aed2e863b 100644 --- a/src/lib/krb5/krb/copy_data.c +++ b/src/lib/krb5/krb/copy_data.c @@ -65,12 +65,10 @@ krb5int_copy_data_contents(krb5_context context, const krb5_data *indata, krb5_d if (!indata) { return EINVAL; } - outdata->length = indata->length; if (outdata->length) { if (!(outdata->data = malloc(outdata->length))) { - krb5_xfree(outdata); return ENOMEM; } memcpy((char *)outdata->data, (char *)indata->data, outdata->length);