| # | Line 96 | Line 96 | interp2_realloc(INTERP2 *ip, int nsamps) | |
|---|---|---|
| 96 | } | |
| 97 | ip = (INTERP2 *)realloc(ip, sizeof(INTERP2)+sizeof(float)*2*(nsamps-1)); | |
| 98 | if (ip == NULL) { | |
| 99 | < | if (nsamps <= ip->ns) |
| 99 | > | if (nsamps <= ip->ns) { |
| 100 | ip = old_ip; | |
| 101 | < | else |
| 101 | > | } else { |
| 102 | > | free(old_ip); |
| 103 | return(NULL); | |
| 104 | + | } |
| 105 | } | |
| 106 | ip->ns = nsamps; | |
| 107 | return(ip); | |
| – | Removed lines |
| + | Added lines |
| < | Changed lines (old) |
| > | Changed lines (new) |