if (!device)
{
if (!alsa->device[0])
- strcpy(alsa->device, "default");
+ strncpy(alsa->device, "default", sizeof(alsa->device));
}
else
{
- strcpy(alsa->device, device);
+ strncpy(alsa->device, device, sizeof(alsa->device));
}
return tsmf_alsa_open_device(alsa);
surface_bits_command->destLeft, surface_bits_command->destTop,
surface_bits_command->width, surface_bits_command->height);
XFree(image);
+ free(xfc->bmp_codec_nsc);
+ xfc->bmp_codec_nsc = NULL;
xf_gdi_surface_update_frame(xfc,
surface_bits_command->destLeft, surface_bits_command->destTop,
surface_bits_command->destLeft, surface_bits_command->destTop,
surface_bits_command->width, surface_bits_command->height);
XFree(image);
+ free(xfc->bmp_codec_none);
+ xfc->bmp_codec_none = NULL;
xf_gdi_surface_update_frame(xfc,
surface_bits_command->destLeft, surface_bits_command->destTop,
void xf_process_rail_server_localmovesize_event(xfContext* xfc, rdpChannels* channels, wMessage* event)
{
- int x, y;
+ int x = 0, y = 0;
rdpRail* rail;
int direction = 0;
Window child_window;
#include <stdio.h>
#define DEBUG_NULL(fmt, ...) do { } while (0)
-#define DEBUG_PRINT(_dbg_str, fmt, ...) fprintf(stderr, _dbg_str fmt "\n" , __FUNCTION__, __LINE__, ## __VA_ARGS__)
+#define DEBUG_PRINT(_dbg_str, fmt, ...) do { \
+ fprintf(stderr, _dbg_str, __FUNCTION__, __LINE__); \
+ fprintf(stderr, fmt, ## __VA_ARGS__); \
+ fprintf(stderr, "\n"); \
+ } while( 0 )
+
#define DEBUG_CLASS(_dbg_class, fmt, ...) DEBUG_PRINT("DBG_" #_dbg_class " %s (%d): ", fmt, ## __VA_ARGS__)
#define DEBUG_WARN(fmt, ...) DEBUG_PRINT("Warning %s (%d): ", fmt, ## __VA_ARGS__)
StreamPool_Return(rdp->transport->ReceivePool, s);
}
-
+ pcap_close(update->pcap_rfx);
+ update->pcap_rfx = NULL;
status = TRUE;
goto freerdp_connect_finally;
}
IFCALL(instance->PostDisconnect, instance);
+ if (instance->update->pcap_rfx)
+ {
+ instance->update->dump_rfx = FALSE;
+ pcap_close(instance->update->pcap_rfx);
+ instance->update->pcap_rfx = NULL;
+ }
+
return TRUE;
}
continue;
#endif
perror("accept");
+ free(client);
return FALSE;
}
}
}
- free(alt_names_length);
+ free(alt_names_lengths);
}
/* if the certificate is valid and the certificate name matches, verification succeeds */
if (pcap->fp != NULL)
fclose(pcap->fp);
+
+ free(pcap);
}
double elapsed_sec = stopwatch_get_elapsed_time_in_seconds(profiler->stopwatch);
double avg_sec = elapsed_sec / (double) profiler->stopwatch->count;
- fprintf(stderr, "| %-30.30s| %10lu | %9f | %9f |\n", profiler->name, profiler->stopwatch->count, elapsed_sec, avg_sec);
+ fprintf(stderr, "| %-30.30s| %10lu | %9f | %9f |\n",
+ profiler->name, profiler->stopwatch->count, elapsed_sec, avg_sec);
}
void profiler_print_footer()
#include <time.h>
#ifdef HAVE_UNISTD_H
-#define _XOPEN_SOURCE 500
+ #ifndef _XOPEN_SOURCE
+ #define _XOPEN_SOURCE 500
+ #endif
#include <unistd.h>
#endif