Changeset 8448


Ignore:
Timestamp:
03/01/13 13:33:05 (9 years ago)
Author:
gf
Message:

log: Free log history on exit.

Make valgrind a little bit happier.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/oscam-log.c

    r8360 r8448  
    218218
    219219#if defined(WEBIF) || defined(MODULE_MONITOR)
    220     if (loghist && exit_oscam != 1) {
     220    if (loghist && !exit_oscam) {
    221221        char *usrtxt = log->cl_text;
    222222        char *target_ptr = NULL;
     
    378378}
    379379
    380 void cs_close_log(void)
     380static void cs_close_log(void)
    381381{
    382382    //Wait for log close:
     
    632632}
    633633
     634void log_free(void) {
     635    cs_close_log();
     636#if defined(WEBIF) || defined(MODULE_MONITOR)
     637    free(loghist);
     638    loghist = loghistptr = NULL;
     639#endif
     640}
  • trunk/oscam-log.h

    r8324 r8448  
    44int32_t cs_init_log(void);
    55int32_t cs_open_logfiles(void);
    6 void cs_close_log(void);
    7 
    86void cs_disable_log(int8_t disabled);
    97
     
    2523void cs_statistics(struct s_client * client);
    2624
     25void log_free(void);
     26
    2727#endif
  • trunk/oscam.c

    r8434 r8448  
    14811481
    14821482    cs_log("cardserver down");
    1483     cs_close_log();
     1483    log_free();
    14841484
    14851485    stop_garbage_collector();
Note: See TracChangeset for help on using the changeset viewer.