Browse Source

Free p on error in ReadPhFile.

master
Reece H. Dunn 9 years ago
parent
commit
ef7994f084
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      src/synthdata.cpp

+ 2
- 0
src/synthdata.cpp View File

/*************************************************************************** /***************************************************************************
* Copyright (C) 2005 to 2014 by Jonathan Duddington * * Copyright (C) 2005 to 2014 by Jonathan Duddington *
* email: [email protected] * * email: [email protected] *
* Copyright (C) 2015 by Reece H. Dunn *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
if(fread(p,1,length,f_in) != length) if(fread(p,1,length,f_in) != length)
{ {
fclose(f_in); fclose(f_in);
Free(p);
return(NULL); return(NULL);
} }



Loading…
Cancel
Save