db: Fix an issue with the memset

We want to memset the entire area of the atuple and not just the
first four/eight bytes of the data.

Fixes: Coverity CID 1040708
This commit is contained in:
Holger Hans Peter Freyther 2013-07-04 20:24:02 +02:00
parent 81cff91ec0
commit e885951f27
1 changed files with 1 additions and 1 deletions

View File

@ -511,7 +511,7 @@ int db_get_lastauthtuple_for_subscr(struct gsm_auth_tuple *atuple,
return -ENOENT;
}
memset(atuple, 0, sizeof(atuple));
memset(atuple, 0, sizeof(*atuple));
atuple->use_count = dbi_result_get_ulonglong(result, "use_count");
atuple->key_seq = dbi_result_get_ulonglong(result, "key_seq");