Show
Ignore:
Timestamp:
02/16/10 00:39:55 (2 years ago)
Author:
Carsten
Message:

Applied patches by Ettl Martin for fixing memory leaks in lwo library.
Closes #7 and #8.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cafu/trunk/ExtLibs/lwo/lwob.c

    r31 r46  
    109109 
    110110   for ( i = 0; i < 3; i++ ) { 
     111 
    111112      env = calloc( 1, sizeof( lwEnvelope )); 
     113      if(!env) 
     114         return 0; 
     115 
    112116      key0 = calloc( 1, sizeof( lwKey )); 
     117      if(!key0) 
     118      { 
     119         free(env); 
     120         return 0; 
     121      } 
     122 
    113123      key1 = calloc( 1, sizeof( lwKey )); 
    114       if ( !env || !key0 || !key1 ) return 0; 
     124      if (!key1) 
     125      { 
     126         free(env); 
     127         free(key0); 
     128         return 0; 
     129      } 
    115130 
    116131      key0->next = key1;