Skip to content

Commit

Permalink
libopenarc: arc_free() semantics should match free()
Browse files Browse the repository at this point in the history
  • Loading branch information
flowerysong committed Nov 6, 2024
1 parent 1c0bba5 commit 2181e8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
### Removed

### Fixed
- libopenarc - `arc_free()` accepts NULL.

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

Expand Down
5 changes: 5 additions & 0 deletions libopenarc/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2397,6 +2397,11 @@ arc_free(ARC_MESSAGE *msg)
struct arc_hdrfield *h;
struct arc_hdrfield *tmp;

if (msg == NULL)
{
return;
}

if (msg->arc_error != NULL)
{
ARC_FREE(msg->arc_error);
Expand Down

0 comments on commit 2181e8a

Please sign in to comment.