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
F164549033: D54932.id.diff
Sun, Aug 2, 1:11 AM
Unknown Object (File)
Sat, Aug 1, 1:44 AM
Unknown Object (File)
Sat, Aug 1, 1:35 AM
Unknown Object (File)
Fri, Jul 31, 1:31 PM
Unknown Object (File)
Sun, Jul 26, 1:58 AM
Unknown Object (File)
Sat, Jul 25, 2:33 PM
Unknown Object (File)
Fri, Jul 24, 8:21 PM
Unknown Object (File)
Tue, Jul 21, 12:40 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 70197
Build 67080: arc lint + arc unit