commit | 438dd4911ddf6e4a1c2eb41cc888cd94c825a9ac | [log] [tgz] |
---|---|---|
author | Andrew Jeffery <andrew@aj.id.au> | Mon Jul 03 11:51:43 2023 +0930 |
committer | Andrew Jeffery <andrew@aj.id.au> | Wed Jul 05 20:30:59 2023 +0930 |
tree | ffcf86931b5d0a7ad725693f130219f009b9cfad | |
parent | ba47e83e7bf595b55749101345deb8a1ccd7ba80 [diff] |
pdr: pldm_pdr_remove_pdrs_by_terminus_handle(): Early exit on bad arg Also add a note in the doxygen commentary in the header. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I7deb62d2ecd5db7f1a67f00a4ddaafb1046226d1
diff --git a/src/pdr.c b/src/pdr.c index 4cb2bf8..d74e898 100644 --- a/src/pdr.c +++ b/src/pdr.c
@@ -998,6 +998,10 @@ uint16_t terminus_handle) { assert(repo != NULL); + if (!repo) { + return; + } + bool removed = false; pldm_pdr_record *record = repo->first;