Skip to content

Commit 0118f35

Browse files
author
MoonKyu Song
committed
Memory leakage for file FD is fixed.
1 parent 7f664d7 commit 0118f35

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

imageview.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -166,17 +166,15 @@ ImageView::loadImage(const QString &path, QSize &splits)
166166
goto failure;
167167
}
168168
free(buffer);
169+
delete fd;
170+
fd = NULL;
169171

170172
splits = getProperMatrixAndSize(mat, img);
171173
resized = img.xForm(mat);
172174
if (resized.isNull()) {
173175
splits = QSize(1,1);
174176
return img;
175177
} else {
176-
/*
177-
resized.detach();
178-
img.resize(0,0);
179-
*/
180178
return resized;
181179
}
182180
failure:

0 commit comments

Comments
 (0)