fix rrdtool compile on solaris where CC for perl is "gcc -B/usr/ccs/bin/"
[rrdtool.git] / src / rrd_graph.c
index 2fc6526..b895225 100644 (file)
@@ -2719,7 +2719,7 @@ rrd_graph_options(int argc, char *argv[],image_desc_t *im)
 
 
        opt = getopt_long(argc, argv, 
-                         "s:e:x:y:v:w:h:iu:l:rb:oc:n:m:t:f:a:z:g",
+                         "s:e:x:y:v:w:h:iu:l:rb:oc:n:m:t:f:a:zg",
                          long_options, &option_index);
 
        if (opt == EOF)
@@ -3064,9 +3064,9 @@ int bad_format(char *fmt) {
                  if (*ptr == '.') ptr++;
                  while (*ptr >= '0' && *ptr <= '9') ptr++;
   
-                 /* Either 'le' or 'lf' must follow here */
+                 /* Either 'le', 'lf' or 'lg' must follow here */
                  if (*ptr++ != 'l') return 1;
-                 if (*ptr == 'e' || *ptr == 'f') ptr++;
+                 if (*ptr == 'e' || *ptr == 'f' || *ptr == 'g') ptr++;
                  else return 1;
                  n++;
             }
@@ -3204,6 +3204,7 @@ printf("DEBUG: start == %lu, end == %lu, %lu steps\n"
                field = (steps-1)*dst->vf.param/100;
                dst->vf.val  = array[field];
                dst->vf.when = 0;       /* no time component */
+               free(array);
 #if 0
 for(step=0;step<steps;step++)
 printf("DEBUG: %3li:%10.2f %c\n",step,array[step],step==field?'*':' ');