MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / strbuf_free

Function strbuf_free

deps/lua/src/strbuf.c:104–114  ·  view source on GitHub ↗

If strbuf_t has not been dynamically allocated, strbuf_free() can * be called any number of times strbuf_init() */

Source from the content-addressed store, hash-verified

102/* If strbuf_t has not been dynamically allocated, strbuf_free() can
103 * be called any number of times strbuf_init() */
104void strbuf_free(strbuf_t *s)
105{
106 debug_stats(s);
107
108 if (s->buf) {
109 free(s->buf);
110 s->buf = NULL;
111 }
112 if (s->dynamic)
113 free(s);
114}
115
116char *strbuf_free_to_string(strbuf_t *s, int *len)
117{

Callers 8

json_destroy_configFunction · 0.85
json_encode_exceptionFunction · 0.85
json_check_encode_depthFunction · 0.85
json_encodeFunction · 0.85
json_throw_parse_errorFunction · 0.85
json_decode_descendFunction · 0.85
json_decodeFunction · 0.85

Calls 2

debug_statsFunction · 0.85
freeFunction · 0.85

Tested by

no test coverage detected