View | Details | Raw Unified | Return to bug 25667
Collapse All | Expand All

(-)ssl_scache_dbm.c (+9 lines)
Lines 228-233 Link Here
228
    apr_datum_t dbmval;
228
    apr_datum_t dbmval;
229
    SSL_SESSION *sess = NULL;
229
    SSL_SESSION *sess = NULL;
230
    UCHAR *ucpData;
230
    UCHAR *ucpData;
231
    UCHAR *ucpDataSave = NULL;
231
    int nData;
232
    int nData;
232
    time_t expiry;
233
    time_t expiry;
233
    time_t now;
234
    time_t now;
Lines 274-279 Link Here
274
        ssl_mutex_off(s);
275
        ssl_mutex_off(s);
275
        return NULL;
276
        return NULL;
276
    }
277
    }
278
279
    /* Save the address value so we can free memory later*/
280
    ucpDataSave = ucpData;
277
    memcpy(ucpData, (char *)dbmval.dptr+sizeof(time_t), nData);
281
    memcpy(ucpData, (char *)dbmval.dptr+sizeof(time_t), nData);
278
    memcpy(&expiry, dbmval.dptr, sizeof(time_t));
282
    memcpy(&expiry, dbmval.dptr, sizeof(time_t));
279
283
Lines 290-295 Link Here
290
    /* unstreamed SSL_SESSION */
294
    /* unstreamed SSL_SESSION */
291
    sess = d2i_SSL_SESSION(NULL, &ucpData, nData);
295
    sess = d2i_SSL_SESSION(NULL, &ucpData, nData);
292
296
297
    if (ucpDataSave != NULL)
298
    {
299
        free(ucpDataSave);
300
        ucpDataSave = NULL;
301
    }
293
    return sess;
302
    return sess;
294
}
303
}
295
304

Return to bug 25667