mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-08 04:11:52 +00:00
glz_enc_dictionary_restore: return NULL upon failure
glz_enc_dictionary_create may return NULL. glz_enc_dictionary_restore itself may return NULL so add one more check. Found-by: gcc (10) analyzer Signed-off-by: Uri Lublin <uril@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
954eabaeb7
commit
031ab732dd
@ -197,6 +197,9 @@ GlzEncDictContext *glz_enc_dictionary_restore(GlzEncDictRestoreData *restore_dat
|
||||
}
|
||||
SharedDictionary *ret = (SharedDictionary *)glz_enc_dictionary_create(
|
||||
restore_data->size, restore_data->max_encoders, usr);
|
||||
if (!ret) {
|
||||
return NULL;
|
||||
}
|
||||
ret->last_image_id = restore_data->last_image_id;
|
||||
return ((GlzEncDictContext *)ret);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user