upnpdev.c 569 B

123456789101112131415161718192021222324
  1. /* $Id: upnpdev.c,v 1.1 2015/08/28 12:14:19 nanard Exp $ */
  2. /* Project : miniupnp
  3. * Web : http://miniupnp.free.fr/
  4. * Author : Thomas BERNARD
  5. * copyright (c) 2005-2015 Thomas Bernard
  6. * This software is subjet to the conditions detailed in the
  7. * provided LICENSE file. */
  8. #include <stdlib.h>
  9. #include "upnpdev.h"
  10. /* freeUPNPDevlist() should be used to
  11. * free the chained list returned by upnpDiscover() */
  12. void freeUPNPDevlist(struct UPNPDev * devlist)
  13. {
  14. struct UPNPDev * next;
  15. while(devlist)
  16. {
  17. next = devlist->pNext;
  18. free(devlist);
  19. devlist = next;
  20. }
  21. }