~ubuntu-branches/ubuntu/utopic/curl/utopic-proposed

« back to all changes in this revision

Viewing changes to lib/pipeline.c

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2014-04-30 13:34:14 UTC
  • mfrom: (76.1.1 utopic)
  • Revision ID: package-import@ubuntu.com-20140430133414-lal4vsnldlvsue7n
Tags: 7.36.0-2ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - Drop dependencies not in main:
    + Build-Depends: Drop stunnel4 and libssh2-1-dev.
    + Drop libssh2-1-dev from binary package Depends.
  - Add new libcurl3-udeb package.
  - Add new curl-udeb package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
201
201
      char *port;
202
202
      struct site_blacklist_entry *entry;
203
203
 
 
204
      hostname = strdup(*sites);
 
205
      if(!hostname) {
 
206
        Curl_llist_destroy(new_list, NULL);
 
207
        return CURLM_OUT_OF_MEMORY;
 
208
      }
 
209
 
204
210
      entry = malloc(sizeof(struct site_blacklist_entry));
205
 
 
206
 
      hostname = strdup(*sites);
207
 
      if(!hostname)
 
211
      if(!entry) {
 
212
        free(hostname);
 
213
        Curl_llist_destroy(new_list, NULL);
208
214
        return CURLM_OUT_OF_MEMORY;
 
215
      }
209
216
 
210
217
      port = strchr(hostname, ':');
211
218
      if(port) {
220
227
 
221
228
      entry->hostname = hostname;
222
229
 
223
 
      if(!Curl_llist_insert_next(new_list, new_list->tail, entry))
 
230
      if(!Curl_llist_insert_next(new_list, new_list->tail, entry)) {
 
231
        site_blacklist_llist_dtor(NULL, entry);
 
232
        Curl_llist_destroy(new_list, NULL);
224
233
        return CURLM_OUT_OF_MEMORY;
 
234
      }
225
235
 
226
236
      sites++;
227
237
    }