File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 7
7
reopened. So we fix the ordering of code in cairotrm_init that
8
8
frees the old plot.cr before reinitializing a new one.
9
9
10
+ * src/parse.c (parse_array_assignment): Memory leak.
11
+
10
12
2017-09-18 Ethan A Merritt <
[email protected] >
11
13
12
14
* src/datafile.c (f_columnhead df_set_key_title) src/datafile.h
Original file line number Diff line number Diff line change 8
8
# This could, for example, depend on data from other columns in the input.
9
9
#
10
10
11
- set title "Clustered bar graph with individual colors\nspecified vis plotstyle 'boxes'"
11
+ set title "Clustered bar graph with individual colors\nspecified via plotstyle 'boxes'"
12
12
set title boxed offset 0,-3 font ",15"
13
13
set style fill solid border lt -1
14
14
set style textbox opaque noborder
@@ -37,4 +37,4 @@ plot for [i=0:3] 'candlesticks.dat' \
37
37
using (xcoord(i)):(column(i+2)):(color(i)) with boxes lc palette z
38
38
39
39
pause -1 "<cr> to continue"
40
- reset
40
+ reset
Original file line number Diff line number Diff line change 1
1
#ifndef lint
2
- static char * RCSid () { return RCSid ("$Id: parse.c,v 1.117 2017-09-18 22:24:03 sfeam Exp $" ); }
2
+ static char * RCSid () { return RCSid ("$Id: parse.c,v 1.118 2017-09-20 01:40:44 sfeam Exp $" ); }
3
3
#endif
4
4
5
5
/* GNUPLOT - parse.c */
@@ -509,6 +509,8 @@ parse_array_assignment_expression()
509
509
510
510
/* Quick check for the most common false positives */
511
511
/* i.e. other constructs that begin with "name[" */
512
+ if (equals (c_token ,"sum" ) && equals (c_token + 3 , "=" ))
513
+ return 0 ;
512
514
if (equals (c_token + 3 , ":" ))
513
515
return 0 ;
514
516
if (equals (c_token + 3 , "]" ) && !equals (c_token + 4 , "=" ))
@@ -528,7 +530,8 @@ parse_array_assignment_expression()
528
530
c_token += 2 ;
529
531
parse_expression ();
530
532
531
- /* If this wasn't really an array element assignment, back out */
533
+ /* If this wasn't really an array element assignment, back out. */
534
+ /* NB: Depending on what we just parsed, this may leak memory. */
532
535
if (!equals (c_token , "]" ) || !equals (c_token + 1 , "=" )) {
533
536
c_token = save_token ;
534
537
at -> a_count = save_action ;
You can’t perform that action at this time.
0 commit comments