Changeset 3d361b8 in mod_gnutls


Ignore:
Timestamp:
Jan 13, 2015, 11:04:38 AM (3 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
master, debian, jessie-backports, upstream
Children:
e4b58b6
Parents:
64dadf8
Message:

Check if filters exist before removing them in ssl_engine_disable

Trying to remove filters that are NULL leads to a segfault in the worker
thread. Check if c->input_filters and c->output_filters are defined
before removing and remove only if set.

Also, output filters should be removed with the dedicated function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mod_gnutls.c

    r64dadf8 r3d361b8  
    8181        return 1;
    8282    }
    83     ap_remove_input_filter(c->input_filters);
    84     ap_remove_input_filter(c->output_filters);
     83    if (c->input_filters)
     84        ap_remove_input_filter(c->input_filters);
     85    if (c->output_filters)
     86        ap_remove_output_filter(c->output_filters);
    8587    mgs_cleanup_pre_config(c->pool);
    8688    sc->enabled = GNUTLS_ENABLED_FALSE;
Note: See TracChangeset for help on using the changeset viewer.