Skip to content

Commit 2181e8a

Browse files
committed
libopenarc: arc_free() semantics should match free()
1 parent 1c0bba5 commit 2181e8a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
1111
### Removed
1212

1313
### Fixed
14+
- libopenarc - `arc_free()` accepts NULL.
1415

1516
## [1.1.0](https://github.com/flowerysong/OpenARC/releases/tag/v1.1.0) - 2024-11-05
1617

libopenarc/arc.c

+5
Original file line numberDiff line numberDiff line change
@@ -2397,6 +2397,11 @@ arc_free(ARC_MESSAGE *msg)
23972397
struct arc_hdrfield *h;
23982398
struct arc_hdrfield *tmp;
23992399

2400+
if (msg == NULL)
2401+
{
2402+
return;
2403+
}
2404+
24002405
if (msg->arc_error != NULL)
24012406
{
24022407
ARC_FREE(msg->arc_error);

0 commit comments

Comments
 (0)