Fixed possible crash.
This commit is contained in:
parent
53a2dfcea7
commit
584ad321ff
@ -210,7 +210,7 @@ HASHTABLE *oldresources;
|
||||
oldusers = service->users;
|
||||
|
||||
/* digest compare */
|
||||
if (memcmp(oldusers->cksum, newusers->cksum, SHA_DIGEST_LENGTH) == 0) {
|
||||
if (oldusers != NULL && memcmp(oldusers->cksum, newusers->cksum, SHA_DIGEST_LENGTH) == 0) {
|
||||
/* same data, nothing to do */
|
||||
LOGIF(LD, (skygw_log_write_flush(
|
||||
LOGFILE_DEBUG,
|
||||
@ -234,7 +234,7 @@ HASHTABLE *oldresources;
|
||||
|
||||
spinlock_release(&service->spin);
|
||||
|
||||
if (i) {
|
||||
if (i && oldusers) {
|
||||
/* free the old table */
|
||||
users_free(oldusers);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user