dorianj / CoRD

CoRD is a Mac OS X remote desktop client for Microsoft Windows computers using the RDP protocol. It's easy to use, fast, and free for anyone to use or modify.
http://cord.sourceforge.net/
346 stars 135 forks source link

potential unset variable used in rdpdr #72

Open danieltrentman opened 9 years ago

danieltrentman commented 9 years ago

diff -wb rdpdr-old.m rdpdr.m 797a798

      if (prev != NULL)

Need to test prev before assignment in while loop:

RDAsynchronousIORequest iorq = conn->fileInfo[fd].firstIORequest, prev;

while (iorq != NULL) { if (iorq == requestToRemove) { if (prev != NULL) prev->next = iorq->next; xfree(requestToRemove); return iorq->next; }