diff --git a/lib/nghttp2_helper.c b/lib/nghttp2_helper.c index 9167ccbb..1a9f6a03 100644 --- a/lib/nghttp2_helper.c +++ b/lib/nghttp2_helper.c @@ -276,3 +276,8 @@ const char* nghttp2_strerror(int error_code) return "Unknown error code"; } } + +void nghttp2_free(void *ptr) +{ + free(ptr); +} diff --git a/lib/nghttp2_helper.h b/lib/nghttp2_helper.h index 8559a12a..61ebbc3b 100644 --- a/lib/nghttp2_helper.h +++ b/lib/nghttp2_helper.h @@ -133,4 +133,12 @@ int nghttp2_check_header_name(const uint8_t *name, size_t len); */ int nghttp2_check_header_name_nocase(const uint8_t *name, size_t len); +/* + * Deallocates memory space pointed by |ptr|. This function exists for + * the application to free the memory space allocated by the library + * functions. Currently this function is hidden from the public API, + * but may be exposed as public API. + */ +void nghttp2_free(void *ptr); + #endif /* NGHTTP2_HELPER_H */