diff options
author | Andy Maloney <andy@forident.com> | 2013-02-10 08:31:51 -0500 |
---|---|---|
committer | S. Davilla <davilla@4pi.com> | 2013-02-19 11:44:57 -0500 |
commit | 8fd95be8616b459d49fa2c968a1eeeb25020a331 (patch) | |
tree | b14888aa01d44561f58ee2d4f834532a0c29db2b | |
parent | 3ac24be492fb67ea84fc08f4090f2f8dc595ed84 (diff) |
Fix memory leaks & Use correct "delete" for arrays
-rw-r--r-- | xbmc/network/AirTunesServer.cpp | 6 | ||||
-rw-r--r-- | xbmc/visualizations/Vortex/VortexVis/Core/Renderer.cpp | 2 | ||||
-rw-r--r-- | xbmc/windowing/egl/EGLNativeTypeRaspberryPI.cpp | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/xbmc/network/AirTunesServer.cpp b/xbmc/network/AirTunesServer.cpp index 8af8319ee5..271fde4e2c 100644 --- a/xbmc/network/AirTunesServer.cpp +++ b/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); diff --git a/xbmc/visualizations/Vortex/VortexVis/Core/Renderer.cpp b/xbmc/visualizations/Vortex/VortexVis/Core/Renderer.cpp index 77b6b4e138..2b2c5984e0 100644 --- a/xbmc/visualizations/Vortex/VortexVis/Core/Renderer.cpp +++ b/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 ); } diff --git a/xbmc/windowing/egl/EGLNativeTypeRaspberryPI.cpp b/xbmc/windowing/egl/EGLNativeTypeRaspberryPI.cpp index 4184665931..10b1ac7d3b 100644 --- a/xbmc/windowing/egl/EGLNativeTypeRaspberryPI.cpp +++ b/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) |