]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libpfctl: handle allocation failure
authorKristof Provost <kp@FreeBSD.org>
Fri, 17 Nov 2023 09:14:59 +0000 (10:14 +0100)
committerKristof Provost <kp@FreeBSD.org>
Fri, 24 Nov 2023 09:19:04 +0000 (10:19 +0100)
commit3b0e5375ca85124a1684ae22b9ef5872ea0f5278
tree5adb27424c95046e52cd4413ade7889dcf6bbe7b
parentecb4d2c6e1d8685c02e730e8986400a52403d8d3
libpfctl: handle allocation failure

While it's unlikely for userspace to fail to allocate memory it is still
possible. Handle malloc() returning NULL.

Reported by: Bill Meeks <bill@themeeks.net>
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 33d55d0d0f33787e9e2796b5000be73af42573bc)
lib/libpfctl/libpfctl.c