/*****************************************************************************
- * RRDtool 1.2rc7 Copyright by Tobi Oetiker, 1997-2005
+ * RRDtool 1.2.16 Copyright by Tobi Oetiker, 1997-2006
*****************************************************************************
* rrd_first Return
*****************************************************************************
{
int target_rraindex=0;
char *endptr;
+ optind = 0; opterr = 0; /* initialize getopt */
while (1){
static struct option long_options[] =
if((rraindex < 0) || (rraindex >= (int)rrd.stat_head->rra_cnt)) {
rrd_set_error("invalid rraindex number");
+ rrd_free(&rrd);
+ fclose(in_file);
return(-1);
}