diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2023-05-11 19:08:34 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2023-05-11 19:08:34 +0900 |
commit | 1eb66efbdd7b0fd09fadbdd5d5650e6c2eae032e (patch) | |
tree | 540e0b986b6d5bed7bef5bc93e23f8b7bd128f20 | |
parent | 620acf6fe3aa22f7b3c50734aade29a2dbe4ef6e (diff) | |
download | libassuan-1eb66efbdd7b0fd09fadbdd5d5650e6c2eae032e.tar.gz |
Allow NULL for system_hooks.
* src/system.c (_assuan_system_hooks_copy): Do nothing with SRC=NULL.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
-rw-r--r-- | src/system.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/system.c b/src/system.c index e5104bb..5f309d0 100644 --- a/src/system.c +++ b/src/system.c @@ -103,6 +103,9 @@ _assuan_system_hooks_copy (assuan_system_hooks_t dst, assuan_system_hooks_t src) { + if (src == NULL) + return; + /* Reset the defaults. */ if (dst != &_assuan_system_hooks) memcpy (dst, &_assuan_system_hooks, sizeof (*dst)); |