<commit_before>
#include <stdlib.h>

#include "cal-mdnssd-bip.h"


void bip_net_free(bip_peer_network_info_t *net) {
    if (net == NULL) return;
    if (net->hostname != NULL) free(net->hostname);
    if (net->buffer != NULL) free(net->buffer);
    free(net);
}
<commit_msg>log a warning if the caller passed us insane arguments<commit_after>
#include <stdlib.h>

#include "cal-mdnssd-bip.h"


void bip_net_free(bip_peer_network_info_t *net) {
    if (net == NULL) {
        g_log(CAL_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "bip_net_free: NULL net passed in");
        return;
    }
    if (net->hostname != NULL) free(net->hostname);
    if (net->buffer != NULL) free(net->buffer);
    free(net);
}

{'fraction_non_alphanumeric': 0.15251798561151078, 'fraction_numerical': 0.0, 'mean_word_length': 3.8, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6797932', 'n_tokens_mistral': 270, 'n_tokens_neox': 267, 'n_words': 58}