getdnsapi / getdns

A modern asynchronous DNS API https://getdnsapi.net/
Other
468 stars 126 forks source link

ownership of dict returned by getdns_context_get_api_information unspecified #410

Closed stbuehler closed 5 years ago

stbuehler commented 6 years ago

getdns_context_get_api_information returns a pointer to a dict, but doesn't specify whether the user has to destroy it.

The current code looks like the user has to destroy it, and it looks like the uses in src/tools/getdns_server_mon.c leak it.

There are other places in the code where ownership really should be documented (e.g. the extensions dict parameter), and also lots of places with the wrong mutability (again the extensions parameter, but also the namespaces parameter in getdns_context_set_namespaces, and probably lots of other places where parameters are not const for no good reason).

wtoorop commented 5 years ago

Done in release 1.5.0