From nobody Mon Feb 9 23:17:53 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1594745245; cv=none; d=zohomail.com; s=zohoarc; b=n34LtHDBthmpgf7HbFKkVFusc/+XtmA4q7ZBK/mA9x3JIrm0IborDxYpRSbnZiuCer9xary4sASIdCrz7eUb85E2Z3eIEWM2DB5GCAqWMz6XO7VlbkRO0/MZjtOQ4QlQsCtq0C69oWD5FQjEK89A5JfFDkRgYthU4cN4jRwtfKk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594745245; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=USDD8NOVLweac+qCIHNujkkaOORfMs3XF+U9+ULZXQQ=; b=n6TedJSQe29mt6WeR0xfsHhD9WmI4diDd+pPk6R0nesVutqf4MHQIOgyQmcMlydc473XRuIhPFO57QRRfaT431pMrSr/QdT/gUjOroc0BD/bWx7qx56B0lXg0bR+zpxjo3jDhc7F1HuWlvOZzvFVuk7xJCL2HUdb8rKzmpDEGck= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1594745245208780.510411016061; Tue, 14 Jul 2020 09:47:25 -0700 (PDT) Received: from localhost ([::1]:32780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvO5T-000783-Qu for importer@patchew.org; Tue, 14 Jul 2020 12:47:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvO1H-000118-7f for qemu-devel@nongnu.org; Tue, 14 Jul 2020 12:43:03 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:36769) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jvO1F-0006o8-Sw for qemu-devel@nongnu.org; Tue, 14 Jul 2020 12:43:02 -0400 Received: by mail-wm1-x343.google.com with SMTP id 17so7248118wmo.1 for ; Tue, 14 Jul 2020 09:43:01 -0700 (PDT) Received: from localhost.localdomain (138.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.138]) by smtp.gmail.com with ESMTPSA id 138sm6474380wmb.1.2020.07.14.09.42.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 09:42:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=USDD8NOVLweac+qCIHNujkkaOORfMs3XF+U9+ULZXQQ=; b=GTeQmvNMice48YiDfyZ5I6vSw7EuqVKGFG46Zw4wr4/3XIc20ISFaDy8vjTsj0wgax vdZVhNl7GH+Rj6oe87kH++F9WvnK63adKOD1Ws40256sUAyswyXsDoxnn+e6Jqaf/SuU 5Vm/mxFbE8EC9EIg5UBP+25s9J6mwkqvCPnjkpfDV7Hi8lrpFA5URGfY2ewx92doaPjj C/yDeT+tcAxQNwLUbrgnFKNKam++epLCVdo4rI+ptkeCOHGSIV2B8F05FmUCFkNGFdLn G3Td2G1ueR5ENYMIXX7uEsk6stIfi5WA1t02QK6oRP5y3UPqgPc2f3PIwbJeHWKXnA+0 3vgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=USDD8NOVLweac+qCIHNujkkaOORfMs3XF+U9+ULZXQQ=; b=IIS9BMdVPH+7hoV5Busd8dBO4GjJs4wA9v+xT2qXy+jLu6v6swj9qlDyvWq6AVIsla BDdkajJ33TOsP68dgOgRE942RPZCAzBDof3rl9sUqEWYCS589bJNnH3ZdWPN+QdvRA7z dKb73X418A0p0eiQG29gehz73F3Tud5OnazW0kb0xFZKU+WWOfVXZwCchkcIV4oTIJMI L0mZfLPfvd11dwTiugvAKWctPutor6gCn9lKSvozmdvuNmWEhHpcm5kyQRUR9/Sm3Yy8 5oD2jJqaIpcNfJUqa5ZNub+Ku1k+ghQNO7KmCrTBNvcbcpV4zKNJqmjhezJhwNhKpGtk wSvg== X-Gm-Message-State: AOAM533oJevdT3debbJ4QxWMhcG54j2TQcQTb0LV5DfSFRnNG8xk3BAn STbXoDCmDQyq8hdbF2uK4BHA3cxGrZg= X-Google-Smtp-Source: ABdhPJzQb10S5gPbzhQ0qqKIiyliGgYiJTbsDBSp8cDmzho8mRbmypuNhkXpwbBeBu13AECJ/oKFGA== X-Received: by 2002:a05:600c:2202:: with SMTP id z2mr4997864wml.13.1594744980334; Tue, 14 Jul 2020 09:43:00 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.1 1/4] qemu/osdep: Document os_find_datadir() return value Date: Tue, 14 Jul 2020 18:42:54 +0200 Message-Id: <20200714164257.23330-2-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200714164257.23330-1-f4bug@amsat.org> References: <20200714164257.23330-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x343.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Sarah Harris , Stefan Weil , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Michael Rolnik , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Document os_find_datadir() returned data must be freed. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 --- os-posix.c | 3 +++ os-win32.c | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/os-posix.c b/os-posix.c index b674b20b1b..3572db3f44 100644 --- a/os-posix.c +++ b/os-posix.c @@ -84,6 +84,9 @@ void os_setup_signal_handling(void) * Find a likely location for support files using the location of the bina= ry. * When running from the build tree this will be "$bindir/../pc-bios". * Otherwise, this is CONFIG_QEMU_DATADIR. + * + * The caller must use g_free() to free the returned data when it is + * no longer required. */ char *os_find_datadir(void) { diff --git a/os-win32.c b/os-win32.c index 6b86e022f0..c9c3afe648 100644 --- a/os-win32.c +++ b/os-win32.c @@ -57,7 +57,12 @@ void os_setup_early_signal_handling(void) atexit(os_undo_timer_resolution); } =20 -/* Look for support files in the same directory as the executable. */ +/* + * Look for support files in the same directory as the executable. + * + * The caller must use g_free() to free the returned data when it is + * no longer required. + */ char *os_find_datadir(void) { return qemu_get_exec_dir(); --=20 2.21.3