<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:08:47 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CDRIVER-214] Fixed memory leak in mongo_replica_set_client</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-214</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;mongo_replica_set_client() allocates memory for conn-&amp;gt;primary, but if mongo_replica_set_init() has been called, that latter memory is lost. The patch adds a call to bson_free() before the new memory is allocated.&lt;/p&gt;

&lt;p&gt;diff --git a/src/mongo.c b/src/mongo.c&lt;br/&gt;
index c8df093..904b1d9 100644&lt;br/&gt;
&amp;#8212; a/src/mongo.c&lt;br/&gt;
+++ b/src/mongo.c&lt;br/&gt;
@@ -660,6 +660,7 @@ MONGO_EXPORT int mongo_replica_set_client( mongo *conn ) {&lt;/p&gt;

&lt;p&gt;                 /* Primary found, so return. */&lt;br/&gt;
                 else if( conn-&amp;gt;replica_set-&amp;gt;primary_connected ) {&lt;br/&gt;
+                    bson_free( conn-&amp;gt;primary );&lt;br/&gt;
                     conn-&amp;gt;primary = bson_malloc( sizeof( mongo_host_port ) );&lt;br/&gt;
                     strncpy( conn-&amp;gt;primary-&amp;gt;host, node-&amp;gt;host, strlen( node-&amp;gt;host ) + 1 );&lt;br/&gt;
                     conn-&amp;gt;primary-&amp;gt;port = node-&amp;gt;port;&lt;/p&gt;</description>
                <environment></environment>
        <key id="75096">CDRIVER-214</key>
            <summary>Fixed memory leak in mongo_replica_set_client</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="gjmurakami">Gary Murakami</assignee>
                                    <reporter username="basic70">Daniel Brahneborg</reporter>
                        <labels>
                    </labels>
                <created>Mon, 13 May 2013 08:33:42 +0000</created>
                <updated>Fri, 9 Aug 2013 21:28:07 +0000</updated>
                            <resolved>Fri, 9 Aug 2013 21:28:07 +0000</resolved>
                                    <version>0.7.1</version>
                                    <fixVersion>0.8.1</fixVersion>
                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="399793" author="auto" created="Fri, 9 Aug 2013 21:27:47 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;gjmurakami-10gen&apos;, u&apos;name&apos;: u&apos;Gary J. Murakami&apos;, u&apos;email&apos;: u&apos;gary.murakami@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-214&quot; title=&quot;Fixed memory leak in mongo_replica_set_client&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-214&quot;&gt;&lt;del&gt;CDRIVER-214&lt;/del&gt;&lt;/a&gt; Fixed memory leak in mongo_replica_set_client&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/7795e65cd05762c121213e850144242c7a6de499&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/7795e65cd05762c121213e850144242c7a6de499&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrntkf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>52763</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>