This callback uses dom_string_create() for a comparison, but forgets
to call either dom_string_destroy() or dom_string_unref() after the
string has outlived its usefulness. The string is used one line after
it is created, so we find dom_string_destroy() to be more clear in
this case.
dom_string_create((const uint8_t *)"_libcss_user_data", 17, &str);
if (dom_string_isequal(str,key) == false || data == NULL) {
/* Wrong key, or no data */
+ dom_string_destroy(str);
return;
}
+ dom_string_destroy(str);
/* Check the DOM operation, and make the corresponding call to
* css_libcss_node_data_handler(). No error handling is done.