1 | /*--------------------------------*-C-*---------------------------------* |
1 | /*----------------------------------------------------------------------* |
2 | * File: rxvtutil.C |
2 | * File: rxvtutil.C |
3 | *----------------------------------------------------------------------* |
3 | *----------------------------------------------------------------------* |
4 | * |
4 | * |
5 | * All portions of code are copyright by their respective author/s. |
5 | * All portions of code are copyright by their respective author/s. |
6 | * Copyright (c) 2004-2006 Marc Lehmann <pcg@goof.com> |
6 | * Copyright (c) 2004-2006 Marc Lehmann <pcg@goof.com> |
… | |
… | |
93 | void * |
93 | void * |
94 | rxvt_temp_buf (int len) |
94 | rxvt_temp_buf (int len) |
95 | { |
95 | { |
96 | if (len > temp_len) |
96 | if (len > temp_len) |
97 | { |
97 | { |
98 | free (temp_buf); |
|
|
99 | temp_buf = malloc (len); |
98 | temp_buf = realloc (temp_buf, len); |
100 | temp_len = len; |
99 | temp_len = len; |
101 | } |
100 | } |
102 | |
101 | |
103 | return temp_buf; |
102 | return temp_buf; |
104 | } |
103 | } |