Commit 77c9f50
committed
SyntaxError__str__(): Fix two memory problems discovered by Insure.
First, the allocated buffer was never freed after using it to create
the PyString object. Second, it was possible that have_filename would
be false (meaning that filename was not a PyString object), but that
the code would still try to PyString_GET_SIZE() it.1 parent 9f6e6c6 commit 77c9f50
1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
778 | | - | |
| 778 | + | |
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
782 | | - | |
| 782 | + | |
| 783 | + | |
783 | 784 | | |
784 | 785 | | |
785 | 786 | | |
786 | 787 | | |
787 | 788 | | |
788 | | - | |
789 | | - | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
790 | 792 | | |
791 | 793 | | |
792 | 794 | | |
| |||
803 | 805 | | |
804 | 806 | | |
805 | 807 | | |
| 808 | + | |
806 | 809 | | |
| 810 | + | |
| 811 | + | |
807 | 812 | | |
808 | 813 | | |
809 | 814 | | |
| |||
0 commit comments