[EMAIL PROTECTED] schreef:
> I no could tell where original function came from.  It was add to 
> tex.c from ???
> It crash for me with free memory already free.
> So this fix it.
>
> Index: tex.c
> ===================================================================
> --- tex.c     (revision 1494)
> +++ tex.c     (working copy)
> @@ -264,7 +264,7 @@
>  
>  void iV_unloadImage(iV_Image *image)
>  {
> -     if (image)
> +     if (image->bmp)
>       {
>               free(image->bmp);
>               image->bmp = NULL;
>   
Ok, I'm only going to tell you this: free(NULL) is a legal no-op, now
you think about what your code does and what the previous code did.
Another hint: this patch is highly likely to cause segfaults.

> Also, I find that lots physfs routines that use copy, use uninit 
> variables, but no seem to be problem?
If they are used to write to rather than to read from before they're
initialized then that should obviously be no problem, otherwise it
obviously is a problem. So without examples, or more info I can't tell
you whether it is, or is not, a problem.

-- 
Giel

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to