L. E. Segovia 2025-05-05 17:51:55 +00:00 committed by GStreamer Marge Bot
parent ba87e0112f
commit 86ef06ddff
3 changed files with 9 additions and 3 deletions

View File

@ -234,7 +234,7 @@ gst_curl_file_sink_prepare_transfer (GstCurlBaseSink * basesink)
if (last_slash != NULL) {
/* create dir if file name contains dir component */
gchar *dir_name = g_strndup (file_name, last_slash - file_name);
if (g_mkdir_with_parents (dir_name, S_IRWXU) < 0) {
if (g_mkdir_with_parents (dir_name, 0755) < 0) {
basesink->error = g_strdup_printf ("failed to create directory '%s'",
dir_name);
g_free (file_name);

View File

@ -534,8 +534,8 @@ static gboolean
url_contains_credentials (const gchar * url)
{
CURLUcode rc;
g_autofree gchar *user = NULL;
g_autofree gchar *pass = NULL;
gchar *user = NULL;
gchar *pass = NULL;
CURLU *handle = NULL;
if (url == NULL) {
@ -556,10 +556,14 @@ url_contains_credentials (const gchar * url)
if (rc != CURLUE_OK)
goto error;
curl_free (pass);
curl_free (user);
curl_url_cleanup (handle);
return TRUE;
error:
curl_free (pass);
curl_free (user);
curl_url_cleanup (handle);
return FALSE;
}

View File

@ -55,7 +55,9 @@
#include <sys/socket.h>
#endif
#include <sys/types.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif