~ubuntu-branches/ubuntu/saucy/apr-util/saucy

« back to all changes in this revision

Viewing changes to buckets/apr_buckets_alloc.c

  • Committer: Package Import Robot
  • Author(s): Stefan Fritsch
  • Date: 2013-05-05 15:43:34 UTC
  • mfrom: (0.1.20 sid)
  • Revision ID: package-import@ubuntu.com-20130505154334-1eiogxnrp49u0oxb
Tags: 1.5.2-1
* New upstream release.
* Ship find_apu.m4 in libaprutil1-dev. Closes: #699327

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
    /* may be NULL for debug mode. */
66
66
    if (allocator == NULL) {
67
67
        if (apr_allocator_create(&allocator) != APR_SUCCESS) {
 
68
            apr_abortfunc_t fn = apr_pool_abort_get(p);
 
69
            if (fn)
 
70
                (fn)(APR_ENOMEM);
68
71
            abort();
69
72
        }
70
73
    }
71
74
#endif
72
 
 
73
75
    list = apr_bucket_alloc_create_ex(allocator);
 
76
    if (list == NULL) {
 
77
            apr_abortfunc_t fn = apr_pool_abort_get(p);
 
78
            if (fn)
 
79
                (fn)(APR_ENOMEM);
 
80
            abort();
 
81
    }
74
82
    list->pool = p;
75
83
    apr_pool_cleanup_register(list->pool, list, alloc_cleanup,
76
84
                              apr_pool_cleanup_null);
131
139
            if (endp >= active->endp) {
132
140
                list->blocks = apr_allocator_alloc(list->allocator, ALLOC_AMT);
133
141
                if (!list->blocks) {
 
142
                    list->blocks = active;
134
143
                    return NULL;
135
144
                }
136
145
                list->blocks->next = active;