branches/zip: page_zip_fields_decode(): Do not dereference a null pointer.

This commit is contained in:
marko 2007-01-08 12:32:31 +00:00
parent 6670fe35c9
commit bdaaa02dda

View file

@ -1267,13 +1267,11 @@ page_zip_fields_decode(
/* Decode the position of the trx_id column. */
if (trx_id_col) {
if (UNIV_UNLIKELY(val >= n)) {
page_zip_fields_free(index);
index = NULL;
}
if (!val) {
val = ULINT_UNDEFINED;
} else if (UNIV_UNLIKELY(val >= n)) {
page_zip_fields_free(index);
index = NULL;
} else {
index->type = DICT_CLUSTERED;
}