X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fb1a47897985cd1ae863626a65cf3d09f5239c75..8758875e0b001444cb677906e68912cb455ab275:/src/msw/dialup.cpp diff --git a/src/msw/dialup.cpp b/src/msw/dialup.cpp index b708fb4612..566c31c335 100644 --- a/src/msw/dialup.cpp +++ b/src/msw/dialup.cpp @@ -709,7 +709,13 @@ size_t wxDialUpManagerMSW::GetISPNames(wxArrayString& names) const if ( dwRet == ERROR_BUFFER_TOO_SMALL ) { // reallocate the buffer - rasEntries = (RASENTRYNAME *)realloc(rasEntries, size); + void *n = realloc(rasEntries, size); + if (n == NULL) + { + free(rasEntries); + return 0; + } + rasEntries = (RASENTRYNAME *)n; } else if ( dwRet != 0 ) {