components/lighttpd/patches/07-parfait-errors.patch
changeset 5738 fc0e1d002c9e
parent 5737 6ccbf34f1588
child 5739 da905fdd7f4a
equal deleted inserted replaced
5737:6ccbf34f1588 5738:fc0e1d002c9e
     1 Developed in-house, fed to community.
       
     2 http://redmine.lighttpd.net/issues/2530
       
     3 
       
     4 --- src/lempar.c	2012-08-31 07:11:20.000000000 -0700
       
     5 +++ src/lempar.c	2013-10-14 02:10:29.201323553 -0700
       
     6 @@ -486,6 +486,9 @@
       
     7    }else if( yyact == YYNSTATE + YYNRULE + 1 ){
       
     8      yy_accept(yypParser);
       
     9    }
       
    10 +  /* Parfait_ALLOW memory-leak - false positive for variable yygotominor - memory is properly freed in function yy_accept above */
       
    11 +  /* parfait needs two comments here to stop complaining and accept Parfait_ALLOW directive, I don't know why */
       
    12 +  return;
       
    13  }
       
    14  
       
    15  /*
       
    16 --- src/mod_mysql_vhost.c	2010-08-17 02:04:38.000000000 -0700
       
    17 +++ src/mod_mysql_vhost.c	2013-10-14 03:48:47.184131818 -0700
       
    18 @@ -217,7 +217,10 @@
       
    19  
       
    20          	if (config_insert_values_global(srv,
       
    21  			((data_config *)srv->config_context->data[i])->value,
       
    22 -			cv)) return HANDLER_ERROR;
       
    23 +			cv)) {
       
    24 +			buffer_free(sel);
       
    25 +			return HANDLER_ERROR;
       
    26 +		}
       
    27  
       
    28  		s->mysql_pre = buffer_init();
       
    29  		s->mysql_post = buffer_init();
       
    30 --- src/lemon.c	2012-08-31 07:11:20.000000000 -0700
       
    31 +++ src/lemon.c	2013-10-14 04:29:24.547185717 -0700
       
    32 @@ -453,13 +453,11 @@
       
    33  #define acttab_yylookahead(X,N)  ((X)->aAction[N].lookahead)
       
    34  
       
    35  /* Free all memory associated with the given acttab */
       
    36 -/*
       
    37  PRIVATE void acttab_free(acttab *p){
       
    38    free( p->aAction );
       
    39    free( p->aLookahead );
       
    40    free( p );
       
    41  }
       
    42 -*/
       
    43  
       
    44  /* Allocate a new acttab structure */
       
    45  PRIVATE acttab *acttab_alloc(void){
       
    46 @@ -3582,6 +3580,7 @@
       
    47  
       
    48    fclose(in);
       
    49    fclose(out);
       
    50 +  acttab_free(pActtab);
       
    51    return;
       
    52  }
       
    53  
       
    54 --- src/fdevent.c	2012-08-31 07:11:20.000000000 -0700
       
    55 +++ src/fdevent.c	2013-10-14 03:55:48.707756259 -0700
       
    56 @@ -77,6 +77,7 @@
       
    57  
       
    58  	log_error_write(ev->srv, __FILE__, __LINE__, "S",
       
    59  		"event-handler is unknown, try to set server.event-handler = \"poll\" or \"select\"");
       
    60 +	free(ev);
       
    61  	return NULL;
       
    62  }
       
    63  
       
    64 --- src/configfile.c	2012-11-07 06:50:29.000000000 -0800
       
    65 +++ src/configfile.c	2013-10-15 06:45:37.918474628 -0700
       
    66 @@ -1131,12 +1131,14 @@
       
    67  	context_free(&context);
       
    68  
       
    69  	if (0 != ret) {
       
    70 +		/* Parfait_ALLOW memory-leak - false positive dcwd variable - memory is properly freed on server close */
       
    71  		return ret;
       
    72  	}
       
    73  
       
    74  	if (NULL != (dc = (data_config *)array_get_element(srv->config_context, "global"))) {
       
    75  		srv->config = dc->value;
       
    76  	} else {
       
    77 +		/* Parfait_ALLOW memory-leak - false positive dcwd variable - memory is properly freed on server close */
       
    78  		return -1;
       
    79  	}
       
    80  
       
    81 @@ -1146,6 +1148,7 @@
       
    82  
       
    83  		if (modules->type != TYPE_ARRAY) {
       
    84  			fprintf(stderr, "server.modules must be an array");
       
    85 +			/* Parfait_ALLOW memory-leak - false positive dcwd variable - memory is properly freed on server close */
       
    86  			return -1;
       
    87  		}
       
    88  
       
    89 @@ -1200,9 +1207,11 @@
       
    90  
       
    91  
       
    92  	if (0 != config_insert(srv)) {
       
    93 +		/* Parfait_ALLOW memory-leak - false positive dcwd variable - memory is properly freed on server close */
       
    94  		return -1;
       
    95  	}
       
    96  
       
    97 +	/* Parfait_ALLOW memory-leak - false positive dcwd variable - memory is properly freed on server close */
       
    98  	return 0;
       
    99  }
       
   100