-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: libmongoc
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Leak of memory or pointers to system resources
Defect 103243 (STATIC_C)
Checker RESOURCE_LEAK (subcategory none)
File: /src/mongoc/mongoc-cursor.c
Function _mongoc_cursor_parse_opts_for_op_query
/src/mongoc/mongoc-cursor.c, line: 1152
Assigning: "dollar_modifier" = storage returned from "bson_strdup_printf("$%s", key)".
dollar_modifier = bson_strdup_printf ("$%s", key);
/src/mongoc/mongoc-cursor.c, line: 1154
Resource "dollar_modifier" is not freed or pointed-to in "bson_set_error".
bson_set_error (&cursor->error,
/src/mongoc/mongoc-cursor.c, line: 1159
Variable "dollar_modifier" going out of scope leaks the storage it points to.
return NULL;