Commit 00a7e3393cbb822bc8cf02c475905efbb83eeb7e

Authored by David Mayerich
1 parent 78578186

fixed agilent binary memory leak

Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
stim/envi/agilent_binary.h
... ... @@ -37,9 +37,10 @@ public:
37 37 return size() * sizeof(T);
38 38 }
39 39 void alloc(){
  40 + if (ptr != NULL) free(ptr);
40 41 ptr = (T*) malloc(bytes());
41 42 }
42   - void alloc(size_t x, size_t y, size_t z){
  43 + void alloc(size_t x, size_t y, size_t z){
43 44 R[0] = x;
44 45 R[1] = y;
45 46 R[2] = z;
... ...