Fix potential use-after-free in dbus byte array demarshaling code

The byte array code should be clearing its own pointer, not the string
array pointer.
This commit is contained in:
Dan Williams 2008-03-05 16:15:10 +02:00 committed by Jouni Malinen
parent 9474b3a4e4
commit cf7a576f67

View file

@ -674,7 +674,7 @@ static dbus_bool_t _wpa_dbus_dict_entry_get_byte_array(
/* Zero-length arrays are valid. */ /* Zero-length arrays are valid. */
if (entry->array_len == 0) { if (entry->array_len == 0) {
free(entry->bytearray_value); free(entry->bytearray_value);
entry->strarray_value = NULL; entry->bytearray_value = NULL;
} }
success = TRUE; success = TRUE;