VirtualBox

Changeset 102562 in vbox


Ignore:
Timestamp:
Dec 11, 2023 8:32:42 AM (17 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160708
Message:

IPRT/http: Fixed a memory leak, updated docs. bugref:9437

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/http-common.h

    r98103 r102562  
    196196
    197197/**
    198  * Returns the name of the HTTP method.
     198 * Returns the name of the HTTP method as a string.
     199 *
    199200 * @returns Read only string.
    200  * @param   enmMethod       The HTTP method to name.
     201 * @param   enmMethod       The HTTP method to return string for.
    201202 */
    202203RTR3DECL(const char *) RTHttpMethodToStr(RTHTTPMETHOD enmMethod);
    203204
     205/**
     206 * Returns the name of the HTTP status as a string.
     207 *
     208 * @returns Read only string.
     209 * @param   enmSts          The HTTP status to return string for.
     210 */
    204211RTR3DECL(const char *) RTHttpStatusToStr(RTHTTPSTATUS enmSts);
    205212
     213/**
     214 * Initializes an HTTP header list.
     215 *
     216 * @returns VBox status code.
     217 * @param   hHdrList            Header list to initialize.
     218 */
    206219RTR3DECL(int) RTHttpHeaderListInit(PRTHTTPHEADERLIST hHdrList);
    207220
     221/**
     222 * Destroys an HTTP header list.
     223 *
     224 * @param   hHdrList            Header list to destroy.
     225 *                              The object will be invalid on return.
     226 */
    208227RTR3DECL(void) RTHttpHeaderListDestroy(RTHTTPHEADERLIST hHdrList);
    209228
  • trunk/src/VBox/Runtime/generic/http.cpp

    r98103 r102562  
    210210
    211211
    212 /**
    213  * Destroys the headers associated with this list (w/o telling cURL about it).
    214  *
    215  * @param   hHdrLst       The HTTP header list instance.
    216  */
    217212RTR3DECL(void) RTHttpHeaderListDestroy(RTHTTPHEADERLIST hHdrLst)
    218213{
     
    221216
    222217    rtHttpHeaderListRemoveAll(pThis);
     218
     219    RTMemFree(hHdrLst);
     220    hHdrLst = NIL_RTHTTPHEADERLIST;
    223221}
    224222
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette