History

src/src_*.c : Fix a potential memory leak.

Erik de Castro Lopo committed 17 years ago

Commit 94966fc1 parent beed7b14 files · +10 −15Browse files

Showing the changes to src/src_linear.c (1 of 4 files). Show all

Unified · Split

src/src_linear.c+2−5
@@ -174,11 +174,8 @@ linear_set_converter (SRC_PRIVATE *psrc, int src_enum) · 173 unmodified lines
174 return SRC_ERR_BAD_CONVERTER ;174 return SRC_ERR_BAD_CONVERTER ;
175 175
176 if (psrc->private_data != NULL)176 if (psrc->private_data != NULL)
177 { priv = (LINEAR_DATA*) psrc->private_data ;177 { free (psrc->private_data) ;
178 if (priv->linear_magic_marker != LINEAR_MAGIC_MARKER)178 psrc->private_data = NULL ;
179 { free (psrc->private_data) ;
180 psrc->private_data = NULL ;
181 } ;
182 } ;179 } ;
183 180
184 if (psrc->private_data == NULL)181 if (psrc->private_data == NULL)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t