Page MenuHomeFreeBSD

heimdal: Pass the correct pointer to free in an error case
ClosedPublic

Authored by jhb on Jan 28 2026, 9:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 15, 6:00 PM
Unknown Object (File)
Fri, May 15, 12:08 PM
Unknown Object (File)
Thu, May 14, 8:23 AM
Unknown Object (File)
Tue, May 12, 11:21 AM
Unknown Object (File)
Tue, May 12, 6:07 AM
Unknown Object (File)
Tue, May 12, 3:49 AM
Unknown Object (File)
Mon, May 11, 12:09 PM
Unknown Object (File)
Fri, May 8, 7:17 PM
Subscribers

Details

Summary

This fixes a warning reported by GCC 14 on stable/14:

crypto/heimdal/lib/hdb/keys.c:241:13: warning: 'free' called on pointer 'ext' with nonzero offset 16 [-Wfree-nonheap-object]

241 |             free(hist_keys);
    |             ^~~~~~~~~~~~~~~

crypto/heimdal/lib/hdb/keys.c:234:15: note: returned from 'calloc'

234 |         ext = calloc(1, sizeof (*ext));
    |               ^~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 5000d023a446 ("heimdal-kadmin: Add support for the -f dump option")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable