Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #2208 from asmaloney/mem_problems

Fix memory leaks & use correct "delete" for arrays
  • Loading branch information...
commit f631f0fcc4393f719ec8b7f80fd00166538cf6cf 2 parents 5cee1fe + c1cc1b3
@Memphiz Memphiz authored
View
6 xbmc/network/AirTunesServer.cpp
@@ -339,8 +339,12 @@ ao_device* CAirTunesServer::AudioOutputFunctions::ao_open_live(int driver_id, ao
header.durationMs = 0;
if (device->pipe->Write(&header, sizeof(header)) == 0)
+ {
+ delete device->pipe;
+ delete device;
return 0;
-
+ }
+
ThreadMessage tMsg = { TMSG_MEDIA_STOP };
CApplicationMessenger::Get().SendMessage(tMsg, true);
View
2  xbmc/visualizations/Vortex/VortexVis/Core/Renderer.cpp
@@ -1347,7 +1347,7 @@ void Renderer::Sphere(int del_uhol_x, int del_uhol_y, float size)
// g_device->DrawPrimitive(D3DPT_TRIANGLESTRIP, i*2*(del_y+1), 2*del_y );
m_pD3DDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2*del_uhol_y, &v[i*2*(del_uhol_y+1)], sizeof(PosColNormalUVVertex));
- delete v;
+ delete [] v;
// pd->DrawPrimitive( D3DPT_TRIANGLESTRIP, i*2*(del_y+1), 2*del_y );
}
View
2  xbmc/windowing/egl/EGLNativeTypeRaspberryPI.cpp
@@ -634,7 +634,7 @@ void CEGLNativeTypeRaspberryPI::GetSupportedModes(HDMI_RES_GROUP_T group, std::v
}
}
if (supported_modes)
- delete supported_modes;
+ delete [] supported_modes;
}
void CEGLNativeTypeRaspberryPI::TvServiceCallback(uint32_t reason, uint32_t param1, uint32_t param2)
Please sign in to comment.
Something went wrong with that request. Please try again.