Changeset 6d32d7 in git


Ignore:
Timestamp:
Nov 10, 1998, 6:03:29 PM (26 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'c7af8613769b29c741d6c338945669719f1fc4f8')
Children:
b711e1f9cda4ccc2a400ee15421ed1be6ced6d08
Parents:
3e35a13599b62cb4895e0a76d1a8dc69295e459d
Message:
*hannes: fixed memory leak


git-svn-id: file:///usr/local/Singular/svn/trunk@2657 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/libparse.l

    r3e35a1 r6d32d7  
    33*  Computer Algebra System SINGULAR     *
    44****************************************/
    5 /* $Id: libparse.l,v 1.29 1998-11-04 18:28:03 Singular Exp $ */
     5/* $Id: libparse.l,v 1.30 1998-11-10 17:03:29 Singular Exp $ */
    66#include <stdio.h>
    77#include <string.h>
     
    5151
    5252char libnamebuf[128];
    53 char *text_buffer;
     53char *text_buffer=NULL;
    5454long string_start;
    5555
     
    262262                }
    263263#  else /* HAVE_NAMESPACES */
     264               if (text_buffer!=NULL) FreeL((ADDRESS)text_buffer);
    264265               text_buffer = mstrdup(libnamebuf);
    265266#  endif /* HAVE_NAMESPACES */
     
    736737                           printf("[%d]", *yytext);
    737738#  else
     739                           if (text_buffer!=NULL) FreeL((ADDRESS)text_buffer);
    738740                           text_buffer = mstrdup(yytext);
    739741#  endif
     
    819821    int len = (int)(current_pos(0) - string_start);
    820822    fseek(yylpin, string_start, SEEK_SET);
     823    if (text_buffer!=NULL) FreeL((ADDRESS)text_buffer);
    821824    text_buffer = (char *)AllocL(len+2);
    822825    myfread(text_buffer, len, 1, yylpin);
Note: See TracChangeset for help on using the changeset viewer.