We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dee7c49 commit 3c05f54Copy full SHA for 3c05f54
1 file changed
driver/others/memory.c
@@ -2882,9 +2882,10 @@ void blas_memory_free(void *free_area){
2882
while ((position < NUM_BUFFERS) && (memory[position].addr != free_area))
2883
position++;
2884
2885
- if (memory[position].addr != free_area) goto error;
+ if (position >= NUM_BUFFERS) goto error;
2886
2887
#ifdef DEBUG
2888
+ if (memory[position].addr != free_area) goto error;
2889
printf(" Position : %d\n", position);
2890
#endif
2891
0 commit comments