Ignore:
Timestamp:
03/27/11 23:11:57 (9 years ago)
Author:
schlocke
Message:

fixed some memleaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/oscam-http-helpers.c

    r4848 r4860  
    635635
    636636    char *value;
     637    if(seconds <= 0)
     638        return "00:00:00";
     639
    637640    if(!cs_malloc(&value, 16 * sizeof(char), -1))
    638641        return "00:00:00";
    639642
    640     if(!seconds)
    641         return "00:00:00";
    642 
    643643    int secs = 0, fullmins = 0, mins = 0, fullhours = 0, hours = 0, days = 0;
    644644
    645     if(seconds > 0) {
    646         secs = seconds % 60;
    647         if (seconds > 60) {
    648             fullmins = seconds / 60;
    649             mins = fullmins % 60;
    650             if(fullmins > 60) {
    651                 fullhours = fullmins / 60;
    652                 hours = fullhours % 24;
    653                 days = fullhours / 24;
    654             }
    655         }
    656     } else {
    657         return "00:00:00";
     645    secs = seconds % 60;
     646    if (seconds > 60) {
     647        fullmins = seconds / 60;
     648        mins = fullmins % 60;
     649        if(fullmins > 60) {
     650            fullhours = fullmins / 60;
     651            hours = fullhours % 24;
     652            days = fullhours / 24;
     653        }
    658654    }
    659655
Note: See TracChangeset for help on using the changeset viewer.