Changeset fc3d4fd5 in mainline for uspace/app/download/main.c


Ignore:
Timestamp:
2017-09-06T22:16:31Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
12dcd5f
Parents:
d14840d
Message:

Downloader should properly clean up HTTP connection.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/download/main.c

    rd14840d rfc3d4fd5  
    7272        void *buf = NULL;
    7373        uri_t *uri = NULL;
     74        http_t *http = NULL;
    7475        int rc;
    7576
     
    182183        }
    183184       
    184         http_t *http = http_create(uri->host, port);
     185        http = http_create(uri->host, port);
    185186        if (http == NULL) {
    186187                fprintf(stderr, "Failed creating HTTP object\n");
     
    234235       
    235236        free(buf);
     237        http_destroy(http);
    236238        uri_destroy(uri);
    237239        if (fclose(ofile) != 0) {
     
    243245error:
    244246        free(buf);
     247        if (http != NULL)
     248                http_destroy(http);
    245249        if (uri != NULL)
    246250                uri_destroy(uri);
Note: See TracChangeset for help on using the changeset viewer.