aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2022-08-17 13:44:16 +0000
committerMatthew Smith <mgsmith@netgate.com>2022-08-17 15:47:23 +0000
commit3ebe1efce1a75b669bfcab905e8bb6759cdc3831 (patch)
tree1ebbac5967b1c28301368d97d9460f035b2f0e2f /src
parentcbc10399d4c30d2188284067c91f58f7cb0cd83d (diff)
svm: fix coverity 249207,249209
Zero-initialize the temporary struct. Type: fix Change-Id: I6f7a35ace6002aa75dc986c7c7eca614c9c5c3ed Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/svm/svmdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/svm/svmdb.c b/src/svm/svmdb.c
index 7628c0ae809..531ea1fbb0d 100644
--- a/src/svm/svmdb.c
+++ b/src/svm/svmdb.c
@@ -433,7 +433,7 @@ svmdb_local_serialize_strings (svmdb_client_t * client, char *filename)
u8 *key;
u32 value;
svmdb_shm_hdr_t *shm = client->shm;
- serialize_main_t _sm, *sm = &_sm;
+ serialize_main_t _sm = { 0 }, *sm = &_sm;
clib_error_t *error = 0;
u8 *sanitized_name = 0;
int fd = 0;
@@ -495,7 +495,7 @@ out:
int
svmdb_local_unserialize_strings (svmdb_client_t * client, char *filename)
{
- serialize_main_t _sm, *sm = &_sm;
+ serialize_main_t _sm = { 0 }, *sm = &_sm;
void *oldheap;
clib_error_t *error = 0;
u8 *key, *value;