Skip to content

Commit 7bd5930

Browse files
committed
Move the free out of the potential error path.
1 parent bf0ac1f commit 7bd5930

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

loader/icd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@ void khrIcdVendorAdd(const char *libraryName)
278278
goto Error;
279279
}
280280
}
281-
free(extensions);
282281

283282
// call clGetPlatformInfo on the returned platform to get the suffix
284283
result = KHR_ICD2_DISPATCH(platform)->clGetPlatformInfo(
@@ -330,6 +329,7 @@ void khrIcdVendorAdd(const char *libraryName)
330329
}
331330
lastVendor = vendor;
332331

332+
free(extensions);
333333
KHR_ICD_TRACE("successfully added vendor %s with suffix %s\n", libraryName, suffix);
334334
continue;
335335
Error:

0 commit comments

Comments
 (0)